Update documentation
This commit is contained in:
parent
e4885e4afa
commit
0a67e3db98
153
README.md
153
README.md
|
@ -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,28 +264,10 @@ 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
|
|
||||||
```
|
|
||||||
cat <<EOF > image/isolinux.txt
|
|
||||||
splash.rle
|
|
||||||
************************************************************************
|
|
||||||
|
|
||||||
This is an Ubuntu from scratch Live CD.
|
|
||||||
|
|
||||||
For the default live system, enter "live". To run memtest86+, enter "memtest"
|
|
||||||
|
|
||||||
************************************************************************
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
## Splash screen
|
|
||||||
|
|
||||||
1. Access build directory
|
1. Access build directory
|
||||||
```
|
```
|
||||||
|
@ -298,31 +280,21 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
|
||||||
<img src="image/splash.png"><br>
|
<img src="image/splash.png"><br>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
3. Convert png image to ppm (indexed 16 colors)
|
3. Move image
|
||||||
```
|
```
|
||||||
convert +dither -colors 16 splash.png splash.ppm
|
sudo mv splash.png image/
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Convert ppm to rle
|
2. **Boot-loader configuration**
|
||||||
```
|
|
||||||
ppmtolss16 '#ffffff=7' < splash.ppm > splash.rle
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Move image
|
|
||||||
```
|
|
||||||
sudo mv splash.rle image/
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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/isolinux.cfg
|
2. Create image/isolinux/isolinux.cfg
|
||||||
```
|
```
|
||||||
cat <<EOF > image/isolinux.cfg
|
cat <<EOF > image/isolinux/isolinux.cfg
|
||||||
path
|
path
|
||||||
include menu.cfg
|
include menu.cfg
|
||||||
default vesamenu.c32
|
default vesamenu.c32
|
||||||
|
@ -330,27 +302,51 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
|
||||||
timeout 50
|
timeout 50
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
3. Create image/menu.cfg
|
|
||||||
|
3. Create image/isolinux/menu.cfg
|
||||||
```
|
```
|
||||||
cat <<EOF > image/menu.cfg
|
cat <<EOF > image/isolinux/menu.cfg
|
||||||
menu hshift 13
|
menu hshift 13
|
||||||
menu width 49
|
menu width 49
|
||||||
menu margin 8
|
menu margin 8
|
||||||
|
|
||||||
menu title Installer boot menu
|
menu title Installer boot menu
|
||||||
|
include stdmenu.cfg
|
||||||
include txt.cfg
|
include txt.cfg
|
||||||
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Create image/txt.cfg
|
4. Create image/isolinux/stdmenu.cfg
|
||||||
```
|
```
|
||||||
cat <<EOF > image/txt.cfg
|
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. Create image/isolinux/txt.cfg
|
||||||
|
```
|
||||||
|
cat <<EOF > image/isolinux/txt.cfg
|
||||||
default live
|
default live
|
||||||
label live
|
label live
|
||||||
menu label ^Try Ubuntu from scratch without installing
|
menu label ^Try Ubuntu without installing
|
||||||
kernel /casper/vmlinuz
|
kernel /casper/vmlinuz
|
||||||
append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd quiet splash ---
|
append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd quiet splash ---
|
||||||
label live-install
|
label live-install
|
||||||
menu label ^Install Ubuntu from scratch
|
menu label ^Install Ubuntu
|
||||||
kernel /casper/vmlinuz
|
kernel /casper/vmlinuz
|
||||||
append file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd quiet splash ---
|
append file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd quiet splash ---
|
||||||
label check
|
label check
|
||||||
|
@ -360,6 +356,10 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
|
||||||
label memtest
|
label memtest
|
||||||
menu label Test ^memory
|
menu label Test ^memory
|
||||||
kernel /install/memtest
|
kernel /install/memtest
|
||||||
|
label rescue
|
||||||
|
menu label ^Rescue mode
|
||||||
|
kernel /install/vmlinuz
|
||||||
|
append vga=788 initrd=/install/initrd.gz rescue/enable=true --- quiet
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -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 .
|
||||||
|
```
|
BIN
image/splash.png
BIN
image/splash.png
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 45 KiB |
Loading…
Reference in New Issue