Update documentation

This commit is contained in:
Marcos Vallim 2019-06-26 23:27:28 -03:00
parent e4885e4afa
commit 0a67e3db98
2 changed files with 162 additions and 95 deletions

241
README.md
View File

@ -253,7 +253,7 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
``` ```
sudo cp chroot/boot/vmlinuz-**-**-generic image/casper/vmlinuz sudo cp chroot/boot/vmlinuz-**-**-generic image/casper/vmlinuz
sudo cp chroot/boot/initrd.img-**-**-generic image/casper/initrd.gz sudo cp chroot/boot/initrd.img-**-**-generic image/casper/initrd
``` ```
3. Copy isolinux and memtest binaries 3. Copy isolinux and memtest binaries
@ -264,104 +264,104 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
sudo cp chroot/boot/memtest86+.bin image/install/memtest sudo cp chroot/boot/memtest86+.bin image/install/memtest
``` ```
## Boot Instructions ## Boot Instructions
1. Access build directory 1. **Splash screen**
```
cd $HOME/live-ubuntu-from-scratch
```
2. Create image/isolinux.txt 1. Access build directory
``` ```
cat <<EOF > image/isolinux.txt cd $HOME/live-ubuntu-from-scratch
splash.rle ```
************************************************************************
This is an Ubuntu from scratch Live CD. 2. Create image 640x480 in png format (splash.png)
For the default live system, enter "live". To run memtest86+, enter "memtest" <p align="center">
<img src="image/splash.png"><br>
</p>
************************************************************************ 3. Move image
EOF ```
``` sudo mv splash.png image/
```
## Splash screen 2. **Boot-loader configuration**
1. Access build directory 1. Access build directory
``` ```
cd $HOME/live-ubuntu-from-scratch cd $HOME/live-ubuntu-from-scratch
``` ```
2. Create image 640x480 in png format (splash.png) 2. Create image/isolinux/isolinux.cfg
```
cat <<EOF > image/isolinux/isolinux.cfg
path
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50
EOF
```
<p align="center"> 3. Create image/isolinux/menu.cfg
<img src="image/splash.png"><br> ```
</p> cat <<EOF > image/isolinux/menu.cfg
menu hshift 13
menu width 49
menu margin 8
3. Convert png image to ppm (indexed 16 colors) menu title Installer boot menu
``` include stdmenu.cfg
convert +dither -colors 16 splash.png splash.ppm include txt.cfg
``` EOF
```
4. Convert ppm to rle 4. Create image/isolinux/stdmenu.cfg
``` ```
ppmtolss16 '#ffffff=7' < splash.ppm > splash.rle cat <<EOF > image/isolinux/stdmenu.cfg
``` menu background splash.png
menu color title * #FFFFFFFF *
menu color border * #00000000 #00000000 none
menu color sel * #ffffffff #76a1d0ff *
menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *
menu color tabmsg * #ffffffff #00000000 *
menu color help 37;40 #ffdddd00 #00000000 none
menu vshift 12
menu rows 10
menu helpmsgrow 15
# The command line must be at least one line from the bottom.
menu cmdlinerow 16
menu timeoutrow 16
menu tabmsgrow 18
menu tabmsg Press ENTER to boot or TAB to edit a menu entry
EOF
```
5. Move image 5. Create image/isolinux/txt.cfg
``` ```
sudo mv splash.rle image/ cat <<EOF > image/isolinux/txt.cfg
``` default live
label live
## Boot-loader configuration menu label ^Try Ubuntu without installing
kernel /casper/vmlinuz
1. Access build directory append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd quiet splash ---
``` label live-install
cd $HOME/live-ubuntu-from-scratch menu label ^Install Ubuntu
``` kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd quiet splash ---
2. Create image/isolinux.cfg label check
``` menu label ^Check disc for defects
cat <<EOF > image/isolinux.cfg kernel /casper/vmlinuz
path append boot=casper integrity-check initrd=/casper/initrd quiet splash ---
include menu.cfg label memtest
default vesamenu.c32 menu label Test ^memory
prompt 0 kernel /install/memtest
timeout 50 label rescue
EOF menu label ^Rescue mode
``` kernel /install/vmlinuz
3. Create image/menu.cfg append vga=788 initrd=/install/initrd.gz rescue/enable=true --- quiet
``` EOF
cat <<EOF > image/menu.cfg ```
menu hshift 13
menu width 49
menu margin 8
menu title Installer boot menu
include txt.cfg
```
4. Create image/txt.cfg
```
cat <<EOF > image/txt.cfg
default live
label live
menu label ^Try Ubuntu from scratch without installing
kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd quiet splash ---
label live-install
menu label ^Install Ubuntu from scratch
kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd quiet splash ---
label check
menu label ^Check disc for defects
kernel /casper/vmlinuz
append boot=casper integrity-check initrd=/casper/initrd quiet splash ---
label memtest
menu label Test ^memory
kernel /install/memtest
EOF
```
## Create manifest ## Create manifest
@ -376,7 +376,7 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
sudo cp -v image/casper/filesystem.manifest image/casper/filesystem.manifest-desktop sudo cp -v image/casper/filesystem.manifest image/casper/filesystem.manifest-desktop
REMOVE='ubiquity ubiquity-frontend-gtk ubiquity-frontend-kde casper lupin-casper live-initramfs user-setup discover1 xresprobe os-prober libdebian-installer4' REMOVE='ubiquity ubiquity-frontend-gtk ubiquity-frontend-kde casper lupin-casper live-initramfs user-setup discover1 xresprobe os-prober debian-installer4'
for i in $REMOVE for i in $REMOVE
do do
@ -400,3 +400,70 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
``` ```
printf $(sudo du -sx --block-size=1 chroot | cut -f1) > image/casper/filesystem.size printf $(sudo du -sx --block-size=1 chroot | cut -f1) > image/casper/filesystem.size
``` ```
## Create diskdefines
1. Access build directory
```
cd $HOME/live-ubuntu-from-scratch
```
2. Create file image/README.diskdefines
```
cat <<EOF > image/README.diskdefines
#define DISKNAME Ubuntu from scratch
#define TYPE binary
#define TYPEbinary 1
#define ARCH amd64
#define ARCHamd64 1
#define DISKNUM 1
#define DISKNUM1 1
#define TOTALNUM 0
#define TOTALNUM0 1
EOF
```
## Recognition as an Ubuntu from scratch
1. Access build directory
```
cd $HOME/live-ubuntu-from-scratch
```
2. Create an empty file named "ubuntu" and a hidden ".disk" folder.
```
touch image/ubuntu
mkdir image/.disk
```
## Calculate MD5
1. Access build directory
```
cd $HOME/live-ubuntu-from-scratch
```
2. Generate md5sum.txt
```
sudo /bin/bash -c "(cd image && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" > md5sum.txt)"
```
## Create ISO Image for a LiveCD
1. Access image directory
```
cd $HOME/live-ubuntu-from-scratch/image
```
2. Create iso from the image directory using the command-line
```
sudo genisoimage -D -r \
-V "Ubuntu from scratch" \
-cache-inodes -J -l \
-b isolinux/isolinux.bin \
-c isolinux/boot.cat \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table -o ../ubuntu-from-scratch.iso .
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 45 KiB