remaster live cd to use Liquorix kernel ...test 2
aus9
Status: Assistant
Joined: 21 Sep 2008
Posts: 358
Location: Australia
Reply Quote
Test 2 builds a debian live cd with liquorix kernel using grub2 bootloader but is console only....no window manager.
WARNING
At no stage should you use a file manager or another terminal or terminal TAB to inspect whats happening inside the chroot we are going to create.
This is so when we leave chroot, no other process can interfere with the exit functions please.

TIP I user terminal called roxterm which allows easy copy and paste.
TIP to move directories I use terminal file manager mc

Source cd
To get source live cd try one of the following:
A
:: Code ::

wget -nc http://ftp.iinet.net.au/debian/debian-cd/6.0.4-live/i386/iso-hybrid/debian-live-6.0.4-i386-standard.iso debian.iso

B sourceforge.net/projects/remasterdeb/files/Sources/

The source cd I rename as debian.iso to make it easier for my commands.

Other steps
Then
:: Code ::

mkdir -p BURN/boot BURN/live
su
mkdir /tmp/iso
mount -o loop debian.iso /tmp/iso

I then use a file manager to grab the squashfile called.....filesystem.squashfs from
/tmp/iso/live folder.

There is no need to grab any other file for this test as we will be using a liquorix kernel and a new "live" initrd. I use root powers for all below.
:: Code ::

unsquashfs filesystem.squashfs
cd squashfs-root

# This new directory.....I call it "unpack"

# Delete some files
:: Code ::

rm etc/resolv.conf etc/apt/sources.list
rm -f vmlinuz* initrd*


Now start adding some files to suit me.
# simple setup for all users for our DNS
### alternative change 208.67.222.222 to the gateway ip of your router
####### either 192.168.1.254 or 10.1.1.1
:: Code ::

echo 'nameserver 208.67.222.222 ' > etc/resolv.conf

# Create new sources.list to take advantage of possible Apt-pinning in future upgrades
:: Code ::

echo '# live ' > etc/apt/sources.list
echo 'deb http://live.debian.net/ squeeze-snapshots main contrib non-free ' >> etc/apt/sources.list
echo '# security ' >> etc/apt/sources.list
echo 'deb http://security.debian.org/ squeeze/updates main ' >> etc/apt/sources.list
echo '# squeeze-updates  ' >> etc/apt/sources.list
echo 'deb http://mirror.aarnet.edu.au/debian/ squeeze-updates main  ' >> etc/apt/sources.list
echo '# debian  ' >> etc/apt/sources.list
echo 'deb http://mirror.aarnet.edu.au/debian/ squeeze main contrib non-free  ' >> etc/apt/sources.list
echo '# liquorix  ' >> etc/apt/sources.list
echo 'deb http://liquorix.net/debian/ sid main  ' >> etc/apt/sources.list

############################################################
# CHROOT
# note its chroot space dot
:: Code ::
 
mount --bind /proc proc && mount --bind /sys sys && mount --bind /dev dev && mount --bind /dev/pts dev/pts
chroot .

#################
# Do some tweaking
#################
# set locale
:: Code ::

dpkg-reconfigure locales
# check no errors
locale

# set keyboard
:: Code ::

dpkg-reconfigure console-data
dpkg-reconfigure keyboard-configuration

# set timezone....kept as UTC but show command in case ppl wish to change
:: Code ::

dpkg-reconfigure tzdata

# now convert to new sources
:: Code ::

apt-get update
--> (gives errors of)
-->W: GPG error: http://liquorix.net sid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3EFF4F272FB2CD80
--->W: GPG error: http://live.debian.net squeeze-snapshots Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6F95B4996CA7B5A6

# Fix up by these commands
:: Code ::

apt-get install liquorix-keyrings
gpg --recv-key 6F95B4996CA7B5A6 && gpg -a --export 6F95B4996CA7B5A6 | apt-key add -

# the first time you run the gpg command the keyserver config is set up
# We need to run the command again
:: Code ::

gpg --recv-key 6F95B4996CA7B5A6 && gpg -a --export 6F95B4996CA7B5A6 | apt-key add -
apt-get update

# we run apt-get update to make sure no errors.
# if new errors found copy and paste the gpg key into the above command
--> Reading package lists... Done

# get some live updates
:: Code ::

apt-get install live-boot-initramfs-tools live-boot  live-config-sysvinit live-config  live-initramfs

# last command will rebuild initrd but we ignore researching how effective it was as we will delete 2.6 kernel after installing 3.2 series

# add inxi script
:: Code ::

cd /usr/local/bin && wget -Nc smxi.org/inxi && chmod +x inxi
cd /


# add inxi (some) missing packages but not the X missing stuff etc
:: Code ::

apt-get install gawk usbutils

#################
# add liquorix kernel
:: Code ::

apt-get install linux-image-liquorix-686

# check what is missing in that install
:: Code ::

find /boot -name *3.4*
/boot/System.map-3.4.0-3.dmz.1-liquorix-686
/boot/vmlinuz-3.4.0-3.dmz.1-liquorix-686
/boot/config-3.4.0-3.dmz.1-liquorix-686

# no initrd ....fix it...Change version number to whatever shows at vmlinuz output line for kernel version.
:: Code ::

update-initramfs -ck 3.4.0-3.dmz.1-liquorix-686

# re-check all is good
:: Code ::

ls boot/initrd* | grep 3.4
boot/initrd.img-3.4.0-3.dmz.1-liquorix-686

# now remove old kernel/initrd stuff
:: Code ::

apt-get remove --purge linux-image-2.6*

# now that squeeze kernel has been removed we can do full update
:: Code ::

apt-get upgrade


# add terminal file manager, bootloader and stuff
:: Code ::

apt-get install mc grub2 partimage zip unzip bzip2  binutils

# Installing grub2 will ask what to have on the kernel grub line
# leave it blank or put anything you like we won't be using it
# installing grub2 will also ask where to put grub2

[ ] /dev/sda (80026 MB; ???) ...............means MBR
[* ] - /dev/sda2 (62841 MB; /) ...............means partition
Do not choose the top option for MBR. You have been warned

Instead choose any partition that shows up.
Assumes a chroot leak.......but better to be safe than sorry.

# grub2 will then install and offer a message
:: Code ::

Writing GRUB to boot device failed - continue?   
and will default to NO

but use arrow key and select <Yes>

# This is because we still don't care that grub2 thinks its not correctly installed as we won't be using this grub2 setup to partition.

# clear out cache.
:: Code ::

apt-get clean

####################################### Interval time out #############
If you want to continue to add software or remove software etc this is where you do it and only later follow the bits after the # line

inserted here as test 3 may use this area
otherwise you need to keep squash file and chroot into it etc

###############################################
# Close down CHROOT and leave unpack folder
:: Code ::

umount /dev/pts && umount /dev && umount /sys && umount /proc
exit
cd ..

# all below are outside chroot or normal commands
# ISOBUILD WITH GRUB2
part one
#####################
# create a folder somewhere where you have sufficient space maybe /tmp or home etc
:: Code ::

mkdir -p BURN/live

move ENTIRE boot/ of unpack to BURN/
:: Code ::

mv squashfs-root/boot BURN

# its moved to reduce size
# remember that if you decide to remaster later to move it back into new unpack

#########################
# Create new squashfile
# ls must show the unpack folder, you can't be in it
######################
:: Code ::

mksquashfs squashfs-root/ liquorix.squashfs

# ISOBUILD WITH GRUB2
part two
#####################
BURN/boot/grub/grub.cfg does not exist yet so create it please.
# assumes normal desktop computer with msdos MBR
:: Quote ::

default=0
set timeout=5
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue

menuentry "Normal" {
linux /boot/vmlinuz boot=live config
initrd /boot/initrd.gz
}

menuentry "Normal with swap" {
linux /boot/vmlinuz boot=live config swapon
initrd /boot/initrd.gz
}

menuentry "vesa graphics" {
linux /boot/vmlinuz boot=live config nomodeset xforcevesa
initrd /boot/initrd.gz
}

menuentry "vesa with swap" {
linux /boot/vmlinuz boot=live config swapon nomodeset xforcevesa
initrd /boot/initrd.gz
}


Also create a backup copy higher up, to make it easier on upgrading as your grub.cfg might be replaced.
:: Code ::

cp BURN/boot/grub/grub.cfg BURN/


# copy into live FOLDER new squash file
:: Code ::

cp liquorix.squashfs BURN/live

# simple names for our grub.cfg
:: Code ::

cd BURN/boot
mv vmlinuz-3.4.0-3.dmz.1-liquorix-686 vmlinuz
mv initrd.img-3.4.0-3.dmz.1-liquorix-686 initrd.gz
### note the initrd has to end in gz please ^^^^^^^^^
cd .. && cd ..

Above has 2 cd--commands to move you out of BURN/boot and then out of BURN

# final check of structure with output of grub directory not shown to save page space
:: Code ::

ls -al BURN/boot
total 17472
drwxr-xr-x 3 root root     4096 Jun 21 19:52 .
drwxr-xr-x 4 root root     4096 Jun 21 19:52 ..
-rw-r--r-- 1 root root   146964 Jun 21 19:52  config-3.4.0-3.dmz.1-liquorix-686
drwxr-xr-x 3 root root     4096 Jun 21 19:52 grub
-rw-r--r-- 1 root root 12962910 Jun 21 19:52 initrd.gz
-rw-r--r-- 1 root root  1624443 Jun 21 19:52 System.map-3.4.0-3.dmz.1-liquorix-686
-rw-r--r-- 1 root root  3105008 Jun 21 19:52 vmlinuz

ls -al BURN
total 20
drwxr-xr-x  4 root   root 4096Jun 21 19:52 .
drwxr-xr-x 12 gordon root 4096 Jun 21 19:52 ..
drwxr-xr-x  3 root   root 4096 Jun 21 19:52 boot
-rw-r--r--  1 root   root  528 Jun 21 19:52 grub.cfg
drwxr-xr-x  2 root   root 4096 Jun 21 19:52 live

ls -al BURN/live
total 179508
drwxr-xr-x 2 root root      4096 Jun 21 19:52 .
drwxr-xr-x 4 root root      4096Jun 21 19:52 ..
-rw-r--r-- 1 root root 183623680 Jun 21 19:52 liquorix.squashfs


## ISOBUILD COMMAND ##############################
# ls must show the BURN folder, you can't be in it.
:: Code ::

grub-mkrescue --output=Liquorix.iso BURN

TIP
I keep the BURN folder and swap in various squashfiles and stuff for future tests.
Once you have a working kernel and initrd, its wise to keep a copy somewhere?

iso information
##################

debian live will create and login to local name called....user

to get to root just run.......................................................sudo su

tp gp back to user...........command .............................su user
(no passwd currently needed)

if you need to set up passwords....change to each user and run command
passwd

but beware that on reboot you need to do it again and if you swap between users you are likely to need to input passwords to change

Note----The new grub.cfg will be used for each iso build

< Edited by aus9 :: Jun 22, 12, 6:31 >

Back to top
aus9
Status: Assistant
Joined: 21 Sep 2008
Posts: 358
Location: Australia
Reply Quote
Result of boot up ....a console only live cd

to be updated to liquorix images later


If you are still not sure if there are any errors run the command mc

and navigate to /var/mail and read mail
if none......there were truly no errors.....which is my build

CREDITS
###############

chroot command style................James Benedito Oliveira

liquorix kernel................Steven Barrett.....aka damentz

debian live script builders..................some are named as:

Ben Armstrong
Chris Lamb
Cody Somerville
Daniel Baumann
intrigeri
Kai Hendry
Marco Amadori
Otavio Salvador
Richard Nelson

source live.debian.net/

debian package maintainers.............too numerous to list

ISO testers who offer feedback

---so far one anon person I shall call blue pills rather than name them in case they are embittered by my errors....hopefully corrected with the xforcevesa bootcode

< Edited by aus9 :: May 4, 12, 4:53 >

Back to top
aus9
Status: Assistant
Joined: 21 Sep 2008
Posts: 358
Location: Australia
Reply Quote
ok I found a quirk, still present in newer 6.0.4 as well

when you read the boot up messages with a bootcode AND without a bootcode of "swapon".....messages read

activating swapfile..................done

but only "swapon" bootcode created the swap as seen after boot by commands such as
cat /proc/swaps

cat /etc/fstab or cat /live/cow/etc/fstab

this may be a bug

Based on 6.0.3 experience I won't bother the project with reporting this issue.

< Edited by aus9 :: May 3, 12, 2:13 >

Back to top
aus9
Status: Assistant
Joined: 21 Sep 2008
Posts: 358
Location: Australia
Reply Quote
I have permission to link to downloads.

# Liquorix.iso.................................................................280 Megs
sourceforge.net/projects/remasterdeb/files/Isos/

GPL COMPLIANCE
##################
# debs downloaded and converted into a squashfile.....53 Megs
and
# original live cd from debian-live project.......................280 Megs

sourceforge.net/projects/remasterdeb/files/Sources/

< Edited by aus9 :: May 4, 12, 4:47 >

Back to top
aus9
Status: Assistant
Joined: 21 Sep 2008
Posts: 358
Location: Australia
Reply Quote
changelog for Liquorix -- used to be damentz

Source live cd 6.0.4 instead of 6.0.3

6.0.3 to 6.0.4 hostname issue now resolved.

Iso name changed to promote the kernel name.

partimage moved from test 3 to here as it does not need X windows running.

add inxi I should have done this before but forgot

add some compressors like zip etc

add binutils here instead of for the elope iso
Back to top
aus9
Status: Assistant
Joined: 21 Sep 2008
Posts: 358
Location: Australia
Reply Quote
added some forgotten packages for inxi

kernel bumped to 3.4.0-3.dmz.1-liquorix-686
Back to top
Display posts from previous:   

All times are GMT - 8 Hours