Update documentation
This commit is contained in:
parent
e4885e4afa
commit
0a67e3db98
257
README.md
257
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/initrd.img-**-**-generic image/casper/initrd.gz
|
||||
sudo cp chroot/boot/initrd.img-**-**-generic image/casper/initrd
|
||||
```
|
||||
|
||||
3. Copy isolinux and memtest binaries
|
||||
|
@ -264,105 +264,105 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
|
|||
|
||||
sudo cp chroot/boot/memtest86+.bin image/install/memtest
|
||||
```
|
||||
|
||||
## Boot Instructions
|
||||
|
||||
1. Access build directory
|
||||
```
|
||||
cd $HOME/live-ubuntu-from-scratch
|
||||
```
|
||||
1. **Splash screen**
|
||||
|
||||
2. Create image/isolinux.txt
|
||||
```
|
||||
cat <<EOF > image/isolinux.txt
|
||||
splash.rle
|
||||
************************************************************************
|
||||
1. Access build directory
|
||||
```
|
||||
cd $HOME/live-ubuntu-from-scratch
|
||||
```
|
||||
|
||||
2. Create image 640x480 in png format (splash.png)
|
||||
|
||||
<p align="center">
|
||||
<img src="image/splash.png"><br>
|
||||
</p>
|
||||
|
||||
This is an Ubuntu from scratch Live CD.
|
||||
3. Move image
|
||||
```
|
||||
sudo mv splash.png image/
|
||||
```
|
||||
|
||||
For the default live system, enter "live". To run memtest86+, enter "memtest"
|
||||
|
||||
************************************************************************
|
||||
EOF
|
||||
```
|
||||
|
||||
## Splash screen
|
||||
|
||||
1. Access build directory
|
||||
```
|
||||
cd $HOME/live-ubuntu-from-scratch
|
||||
```
|
||||
|
||||
2. Create image 640x480 in png format (splash.png)
|
||||
|
||||
<p align="center">
|
||||
<img src="image/splash.png"><br>
|
||||
</p>
|
||||
|
||||
3. Convert png image to ppm (indexed 16 colors)
|
||||
```
|
||||
convert +dither -colors 16 splash.png splash.ppm
|
||||
```
|
||||
|
||||
4. Convert ppm to rle
|
||||
```
|
||||
ppmtolss16 '#ffffff=7' < splash.ppm > splash.rle
|
||||
```
|
||||
|
||||
5. Move image
|
||||
```
|
||||
sudo mv splash.rle image/
|
||||
```
|
||||
|
||||
## Boot-loader configuration
|
||||
|
||||
1. Access build directory
|
||||
```
|
||||
cd $HOME/live-ubuntu-from-scratch
|
||||
```
|
||||
|
||||
2. Create image/isolinux.cfg
|
||||
```
|
||||
cat <<EOF > image/isolinux.cfg
|
||||
path
|
||||
include menu.cfg
|
||||
default vesamenu.c32
|
||||
prompt 0
|
||||
timeout 50
|
||||
EOF
|
||||
```
|
||||
3. Create image/menu.cfg
|
||||
```
|
||||
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
|
||||
```
|
||||
2. **Boot-loader configuration**
|
||||
|
||||
1. Access build directory
|
||||
```
|
||||
cd $HOME/live-ubuntu-from-scratch
|
||||
```
|
||||
|
||||
2. Create image/isolinux/isolinux.cfg
|
||||
```
|
||||
cat <<EOF > image/isolinux/isolinux.cfg
|
||||
path
|
||||
include menu.cfg
|
||||
default vesamenu.c32
|
||||
prompt 0
|
||||
timeout 50
|
||||
EOF
|
||||
```
|
||||
|
||||
3. Create image/isolinux/menu.cfg
|
||||
```
|
||||
cat <<EOF > image/isolinux/menu.cfg
|
||||
menu hshift 13
|
||||
menu width 49
|
||||
menu margin 8
|
||||
|
||||
menu title Installer boot menu
|
||||
include stdmenu.cfg
|
||||
include txt.cfg
|
||||
EOF
|
||||
```
|
||||
|
||||
4. Create image/isolinux/stdmenu.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
|
||||
label live
|
||||
menu label ^Try Ubuntu 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
|
||||
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
|
||||
label rescue
|
||||
menu label ^Rescue mode
|
||||
kernel /install/vmlinuz
|
||||
append vga=788 initrd=/install/initrd.gz rescue/enable=true --- quiet
|
||||
EOF
|
||||
```
|
||||
|
||||
## Create manifest
|
||||
|
||||
1. Access build directory
|
||||
|
@ -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
|
||||
|
||||
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
|
||||
do
|
||||
|
@ -399,4 +399,71 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
|
|||
3. Write the 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