View previous topic :: View next topic |
Author |
Message |
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Sat Oct 30, 2004 6:50 pm Post subject: [mini-HowTo] Gentoo Linux LiveCD for Dummies! |
|
|
LiveCD: A Gentoo Linux running off a CD
Dummies: People like me that want to do it manually not through catalyst
Introduction
A LiveCD is very handy. It allows you to boot a computer into linux from the CD-ROM drive. This gives flexibilty and power to do whatever you want with your machine. Fix it, repartition or resize the drives, install Gentoo, etc.
Catalyst (http://www.gentoo.org/proj/en/releng/catalyst/index.xml) is a great tool that allows you to make Gentoo LiveCDs the same way the release engineering team creates them for us. However, the tool is designed with automation in mind, and with that you loose some flexibility.
This mini-HowTo will show you how simple it is to create your own LiveCD by hand. It will also allow you to have the following advantages over the catalyst way:
1. The build source will be kept intact and will not get deleted between iterations of LiveCD creation. This will allow you to sync, update, merge, and customize your environment incrementally the same way you do it with a real system.
2. The CD will boot using GRUB, not ISOLINUX. This gives you the same flexibility you have with a real system, that it, changing kernel parameters, discovering devices, etc.
3. As a nice side effect of keeping your build source between iterations, the build time will be reduced dramatically.
Requirements
You need to have enough space on your system. Depending on what packages you need to include in your LiveCD, this will vary. I'd say in average a 4GB free space is fair enough.
You must be familiar with installing Gentoo using a stage2 tarball because that's what we're going to use in this mini-HowTo. If you're in doubt, consult the Gentoo Handbook (http://www.gentoo.org/doc/en/handbook/).
Setting up the build environment
Our build environment is just a directory that we will 'chroot' to and install Gentoo in. Its contents will make the LiveCD later on. I will use the name 'source' for it, and will create it under a directory in my home called 'livecd'.
Code: |
cd ~
mkdir -p livecd/source
|
Download a stage2 tarball from one of the Gentoo mirrors to your home directory. I'm using an i686 stage2 in this mini-HowTo since I thought it's generic enough to run on most of todays PCs. Once downloaded untar it to 'source'. Then create necessary 'newroot' directory which will be used during initial boot
Code: |
cd livecd/source
tar jxvpf ~/stage2-i686-2004.2.tar.bz2
mkdir newroot
|
Now, download the latest portage snapshot to your home directory and untar it to your new build directory
Code: |
cd livecd/source/usr/
tar jxvf ~/portage-whatever.tar.bz2
|
If you need to download packages during the installation, then setup whatever files in 'livecd/source/etc' required to reach the internet. For example 'resolv.conf'.
Your source directory is now ready to start installating Gentoo.
Installing Gentoo
Setup necessary mount points before you 'chroot' to your build directory and start installation. On my system I keep 'distfiles' under the default '/usr/portage' directory. I'm going to use it instead of downloading distfiles again during the installation.
Code: |
cd livecd/source
mount -o bind /proc proc
mount -o bind /usr/portage/distfiles usr/portage/distfiles
|
Now 'chroot' to source and start the installation. A few points about modifying '/etc/make.conf'
1. Be concious with USE variables. The more you use, the bigger your envirnoment will get. It might even be so big that it won't fit on a CD! I use kde only, and don't care about docs and java, so I added the follwoing: '-gnome -gtk -java -doc'
2. Make sure you add 'livecd' to your USE variables. This, along with a 'cdroot' parameter that we'll pass to the kernel at boot time, will make init scripts aware of the fact that we're booting off a cdrom, so it doesn't do inappropriate things like checking the root filesystem!
Here're the installation steps roughly
Code: |
cd livecd/source
chroot . /bin/bash --login
env-update
source /etc/profile
emerge system
ln -sf /usr/share/zoneinfo/<path to time zone file> /etc/localtime
emerge <required packages, as you like, e.g. logger hotplug udev>
rc-update add <the services required, e.g. hotplug, net.eth0, sysklogd> default <or boot, as fits>
emerge <optional packages, as you like, e.g. kde, mplayer>
|
Before we merge the kernel and boot loader, let's modify important files in '/etc'. First, fstab
Code: |
/dev/loop0 / squashfs ro,defaults 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
none /dev/pts devpts defaults 0 0
|
Notice that we're mouting root over a loop device with filesystem type 'squashfs', more on that later. Now, modify other '/etc' files as you see fits (e.g. hostname, rc.conf, conf.d/*, and so on)
Now merge your desired kernel. I'm using development-sources (2.6) which I patched with the things I need (vesafb-tng, reiser4, mppe-mppc, etc.). We're going to use squashfs (http://squashfs.sourceforge.net) as our root filesystem. So, be sure to patch your kernel with it if it's not already included. Also, this guide assumes that we're booting of an IDE cdrom.
When configuring your kernel, make sure the following is compiled in
1. squashfs filesystem
2. iso9660 cdrom filesystem
3. initrd support, set size to 8MB
4. loopback block device support
5. IDE/ATAPI cdrom device support
6. ext2 filesystem support (which we use for our initrd image)
7. tmpfs filesystem support
Code: |
emerge development-sources #add patches after this
cd /usr/src/linux
make menuconfig #configure your kernel
make bzImage modules modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz
|
The final step is merging and configuring the boot loader. We're going to use the latest GRUB since it has support for booting a cdrom.
Code: |
ACCEPT_KEYWORDS="~x86" emerge grub
|
And here's '/boot/grub/grub.conf'
Code: |
default 0
timeout 5
splashimage=(cd)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (cd)
kernel (cd)/boot/vmlinuz video=vesafb:1024x768-32 root=/dev/ram0 rw init=/linuxrc cdroot
initrd (cd)/boot/initrd
|
You can discard the 'video' kernel parameter if you want, but the rest are necessary. Our next step is to create the 'initrd' image.
Creating the initrd image
This is where most of the action occures during booting. It's a very simple task once you get the hang of it. First create the image, I'm using an 8MB initrd but feel free ot expand that if you need more, just remember to set the option in your kernel configuration for the maximum ramdisk size properly.
Code: |
touch /boot/initrd
dd if=/dev/zero of=/boot/initrd bs=1024k count=8
losetup /dev/loop0 /boot/initrd
mke2fs /dev/loop0
mkdir /mnt/initrd
mount /dev/loop0 /mnt/initrd
|
Now populate the image with required directories and files:
Code: |
cd /mnt/initrd
mkdir etc dev lib bin proc new cdrom
touch linuxrc
chmod +x linuxrc
touch etc/mtab
touch etc/fstab
|
linuxrc is what will get executed when linux boots. More on it below.
Now you need to copy necessary files into bin and lib. For bin, copy the following:
Code: |
/bin/sh
/bin/cat
/bin/mount
/bin/umount
/bin/mkdir
/bin/chroot
/bin/tar
/sbin/pivot_root
|
For lib, you'll need to find out which lib files are needed by each of the binaries above. The way to do it is to run 'ldd' for each file above and copy the required libs over. Example
Code: |
ldd /bin/mount
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0x4002e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
cp /lib/libc.so.6 /mnt/initrd/lib/
cp /lib/ld-linux.so.2 /mnt/initrd/lib/
|
And so on for the rest of the binaries.
Now, we need to create necessary devices under dev directory:
Code: |
mknod /mnt/initrd/dev/console c 5 1
mknod /mnt/initrd/dev/null c 1 3
mknod /mnt/initrd/dev/hda b 3 0
mknod /mnt/initrd/dev/hdb b 3 64
mknod /mnt/initrd/dev/hdc b 22 0
mknod /mnt/initrd/dev/hdd b 22 64
mknod /mnt/initrd/dev/tty c 4 0
mknod /mnt/initrd/dev/loop0 b 7 0
|
Finally, we need to create our linuxrc script. The script will do the follwoing:
1. Save whatever is passed to the kernel to pass it later on to /sbin/init
2. Locate the CDROM device (we search only in hda, hdb, hdc, and hdd, which are the most common IDE cdrom drives)
3. Mount the cdrom on /cdrom
4. Mount the squashed filesystem image (which is our whole gentoo installation shrinked to a single file) on /new. This will become our root filesystem, which is read-only
5. Create necessary read-write mount points (etc, var, tmp, and root) as tmpfs filesystems and fill them up
6. Finally, pivot the root filesystem on newroot and start the real init process
Code: |
#!/bin/sh
export PATH=/bin
# Get kernel CMDLINE
mount -t proc none /proc
CMDLINE=`cat /proc/cmdline`
umount /proc
# Mount CD device
CDROM=""
for x in hda hdb hdc hdd
do
mount -t iso9660 -r /dev/${x} /cdrom > /dev/null 2>&1
if [ "$?" = "0" ]
then
CDROM="${x}"
break
fi
done
# CD not found
if [ "${CDROM}" == "" ]
then
exec /bin/sh
exit
fi
# Mount root and create read-write directories
mount -t squashfs -o loop /cdrom/files/source.img /new > /dev/null 2>&1
mount -t tmpfs -o size=32m none /new/var > /dev/null 2>&1
mount -t tmpfs -o size=32m none /new/etc > /dev/null 2>&1
mount -t tmpfs -o size=32m none /new/tmp > /dev/null 2>&1
mount -t tmpfs -o size=32m none /new/root > /dev/null 2>&1
cd /new/var && tar xpf /cdrom/files/var.tar > /dev/null 2>&1
cd /new/etc && tar xpf /cdrom/files/etc.tar > /dev/null 2>&1
cd /new/root && tar xpf /cdrom/files/root.tar > /dev/null 2>&1
# Pivot root and start real init
cd /new
pivot_root . newroot
exec chroot . /bin/sh <<- EOF >dev/console 2>&1
exec /sbin/init ${CMDLINE}
EOF
|
Notice that I'm using 4 x 32MB tmpfs filesystems. That's a lot of RAM! Reduce it if your wish. It's just that all the systems I work with have plenty of RAM (servers) so I don't worry about it.
That's it! Our source directory is ready. But before we move on we need to do some modifications. First, since '/var' holds portage directories 'cache' and 'db', and these are big, we'll move them to '/usr/lib/portage' to save space on '/var'
Code: |
cd /var
mv cache db /usr/lib/portage/
ln -s /usr/lib/portage/cache cache
ln -s /usr/lib/portage/db db
|
Second, if you're using 'udev' for device management like I do, and relying on gentoo to save devices state before rebooting, you'll need to do this
Code: |
cd /lib
mv udev-state /var/lib
ln -s /var/lib/udev-state udev-state
|
This is because /lib is not writable on our cdrom!
We're done with our source directory. Exit 'chroot' and unmount proc and distfiles. Now, off to creating the CD!
Building the LiveCD
Building the LiveCD invloves the follwoing steps
1. Clean up unnecissary directories in source (like /tmp and /var/tmp)
2. Create the target directory that will be used to make the iso image
3. Save the read-write directories (like /etc and /var) using tar to target
4. Using squashfs tools, convert the source directory to a squashed image
5. And finally, make the iso image
To help automate these steps, create a simple 'build' script inside 'livecd'
Code: |
cd livecd
touch build
chmod +x build
|
And here's the script
Code: |
#!/bin/bash
rm -rf target
mkdir target
cp -a source/boot target/
mkdir target/files
rm -rf source/var/tmp/*
rm -rf source/var/run/*
rm -rf source/var/lock/*
rm -rf source/tmp/*
rm -f source/etc/mtab
touch source/etc/mtab
cd source/etc/
tar cvpf ../../target/files/etc.tar * .[[:alnum:]]*
cd ../var/
tar cvpf ../../target/files/var.tar * .[[:alnum:]]*
cd ../root/
tar cvpf ../../target/files/root.tar * .[[:alnum:]]*
cd ../../
mksquashfs source/ target/files/source.img
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size \
4 -boot-info-table -iso-level 4 -hide boot.catalog -o ~/livecd.iso target/
|
Always check that the size of each tar file produced is within the size of tmpfs ram drive that you create (32MB in this howto).
Squashing a large 'source' directory takes some time, so be patient. Once done, just burn your ISO image, boot it, and enjoy
Tips
I use a simple script to chroot to my build source each time I need to sync portage, merge new packages, customize kde. I called it 'work'
Code: |
cd livecd
touch work
chmod +x work
|
Here it is
Code: |
#!/bin/bash
mount -o bind /proc source/proc
mount -o bind /sys source/sys
mount -o bind /dev source/dev
mount -o bind /dev/pts source/dev/pts
mount -o bind /usr/portage/distfiles source/usr/portage/distfiles
chroot source/ /bin/bash --login
umount source/proc
umount source/sys
umount source/dev/pts
umount source/dev
umount source/usr/portage/distfiles
|
Mounting /dev is important to get things like X to work from a chroot environment.
Another thing to consider is the size of your build source. As you can see, there're things that take a lot of space that are strictly not needed on a LiveCD. Two major candidates are '/usr/src' and '/usr/portage'. If you don't want to include them on your LiveCD don't delete them, you can utilize an option in 'mksquashfs' to exclude any directory from the squashed image. This will keep your build source directory intact.
If booting the CD fails at some point during linuxrc script execution, you can always change your grub line to 'init=/bin/sh' instead of linuxrc. This will give you a nice little shell inside the initrd image at boot time. From there you can type the commands in the linuxrc script manually and try to find out with one is failing and why.
I hope I didn't miss anything, and hope you find this mini-HowTo usefull. Your corrections/feedback are always welcome
Last edited by veezi on Wed Dec 01, 2004 10:20 pm; edited 7 times in total |
|
Back to top |
|
|
fennec l33t
Joined: 30 Aug 2003 Posts: 613 Location: Montreal
|
Posted: Sat Oct 30, 2004 7:26 pm Post subject: |
|
|
great work, I was a little lost looking at all posts around and the doc is really obscure for beginners
thanks a lot for your hard work!!!! |
|
Back to top |
|
|
fennec l33t
Joined: 30 Aug 2003 Posts: 613 Location: Montreal
|
Posted: Sat Oct 30, 2004 7:43 pm Post subject: |
|
|
Quote: | Setup necessary mount points before you 'chroot' to your build directory and start installation. I keep my 'distfiles' and 'packages' in atop level directory I call 'data' in my system, and modify '/etc/make.conf' to point there. So, I'm going to use it instead of downloading distfiles again.
Code: | cd livecd/source
mount -o bind /proc proc
mkdir data
mount -o bind /data data |
|
would you mean that if we keep this standard, you would mount your local /usr/portage/distfiles to /mnt/livecd/usr/portage/distfiles ?
[/code] |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Sat Oct 30, 2004 8:11 pm Post subject: |
|
|
fennec wrote: | Quote: | Setup necessary mount points before you 'chroot' to your build directory and start installation. I keep my 'distfiles' and 'packages' in atop level directory I call 'data' in my system, and modify '/etc/make.conf' to point there. So, I'm going to use it instead of downloading distfiles again.
Code: | cd livecd/source
mount -o bind /proc proc
mkdir data
mount -o bind /data data |
|
would you mean that if we keep this standard, you would mount your local /usr/portage/distfiles to /mnt/livecd/usr/portage/distfiles ?
[/code] |
Yes! Also, by same token, /usr/portage/packages. This will
1. Allow you to use distfiles from both locations (your system, and your livecd build environment).
2. Allow you to compile once, on your system, and use binary pkg for livecd environment if you choose to. |
|
Back to top |
|
|
chunderbunny Veteran
Joined: 31 May 2004 Posts: 1281 Location: 51°24'27" N, 0°57'15" W
|
Posted: Sat Oct 30, 2004 9:21 pm Post subject: |
|
|
You have no idea how long I spent trying to achieve this, but I could never get it to boot properly (my kernel always failed to find init.) This will really help, thanks!
Edit: Why is the HOWTO listed twice? |
|
Back to top |
|
|
cron0 Tux's lil' helper
Joined: 05 Jan 2004 Posts: 132 Location: Montreal, Quebec
|
Posted: Sat Oct 30, 2004 10:03 pm Post subject: |
|
|
Thank you SO much for taking the time to write this!
I've wanted to create a personnal LiveCD for very long and I I couldn't find out how to do it!
Thank you!!
PS: Yeah, why is it listed twice? They seem to be different. The 2nd one seem to be more refined. |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Sat Oct 30, 2004 10:17 pm Post subject: |
|
|
JF_Cron0 wrote: |
PS: Yeah, why is it listed twice? They seem to be different. The 2nd one seem to be more refined. |
Oops! Editing mistake .. fixed it. |
|
Back to top |
|
|
fennec l33t
Joined: 30 Aug 2003 Posts: 613 Location: Montreal
|
Posted: Sat Oct 30, 2004 10:22 pm Post subject: |
|
|
another question is which packages includes mkisofs mksquashfs ? |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Sat Oct 30, 2004 10:33 pm Post subject: |
|
|
fennec wrote: | another question is which packages includes mkisofs mksquashfs ? |
mksquashfs -> sys-fs/squashfs-tools
mkisofs -> Not sure! maybe cdrtools or cdrecord |
|
Back to top |
|
|
fennec l33t
Joined: 30 Aug 2003 Posts: 613 Location: Montreal
|
Posted: Sat Oct 30, 2004 10:34 pm Post subject: |
|
|
fennec wrote: | another question is which packages includes mkisofs mksquashfs ? |
I found them...
squashfs-tools
cdrtools |
|
Back to top |
|
|
frenkel Veteran
Joined: 13 May 2003 Posts: 1034 Location: .nl
|
Posted: Sun Oct 31, 2004 10:44 am Post subject: |
|
|
Great howto!! But there's one typo...
Quote: |
Now, we need to create necessary devices under dev directory:
Code: |
mknod /mnt/initrd/dev/console c 5 1
mknod /mnt/initrd/dev/null c 1 3
mknod /mnt/initrd/dev/hda b 3 0
mknod /mnt/initrd/dev/hdb b 3 64
mknod /mnt/initrd/dev/hdc b 22 0
mknod /mnt/initrd/dev/hdc b 22 64
mknod /mnt/initrd/dev/tty c 4 0
mknod /mnt/initrd/dev/loop0 b 7 0
|
|
The last hdc should be hdd.
Thanks for the great howto!
Frank _________________ http://techfield.org |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Sun Oct 31, 2004 10:50 am Post subject: |
|
|
Thanks for the tip .. fixed it. |
|
Back to top |
|
|
chunderbunny Veteran
Joined: 31 May 2004 Posts: 1281 Location: 51°24'27" N, 0°57'15" W
|
Posted: Sun Oct 31, 2004 1:46 pm Post subject: |
|
|
Well, I finally got it all working, thanks a lot!
I think you should make it clear that the data directory is actually required on the cd, even if you don't normally keep distfiles and packages in that directory.
Also you could change the last line of the build script so that people like me don't accidentally copy it directly and get errors since the "boot.catalog -o ~/livecd.iso target/ " part is on a new line. |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Sun Oct 31, 2004 4:36 pm Post subject: |
|
|
chunderbunny wrote: | Well, I finally got it all working, thanks a lot!
I think you should make it clear that the data directory is actually required on the cd, even if you don't normally keep distfiles and packages in that directory.
Also you could change the last line of the build script so that people like me don't accidentally copy it directly and get errors since the "boot.catalog -o ~/livecd.iso target/ " part is on a new line. |
Thanks for the feedback. I removed all references to data since it's confusing! I replaced with standard location of distfiles (/usr/portage).
Also, fixed the last line of script |
|
Back to top |
|
|
Illissius Guru
Joined: 31 Jul 2004 Posts: 395 Location: Hungary
|
Posted: Mon Nov 01, 2004 10:10 pm Post subject: |
|
|
Thanks for the howto; I've been looking for something like this. Three questions:
(1) Is it required to do this in your home directory? I only have ~1GB of space free on / which includes /home, but I also have /misc (FAT32, for files I want to access from windows) which has 7GB free. I tried doing it there, but untarring the stage thingy gave a bunch of errors about not being able to create (sym)links.
(2) What, if any, is the difference between a Knoppix kernel, a kernel generated with genkernel, and one you create by just editing the .config by hand? So, basically, I want whatever has the highest compatibility, except I want to patch it with the staircase scheduler - which option would that be?
(3) Is there any way to tell how big the stuff in the source directory will be after it's squashed? ie, you have 700MB of (compressed) space on the CD; how much actual space in the source directory does that translate to? _________________ Work is punishment for failing to procrastinate effectively.
last.fm |
|
Back to top |
|
|
monkey89 Guru
Joined: 08 Mar 2004 Posts: 596
|
Posted: Mon Nov 01, 2004 10:37 pm Post subject: |
|
|
Illissius wrote: | (1) Is it required to do this in your home directory? I only have ~1GB of space free on / which includes /home, but I also have /misc (FAT32, for files I want to access from windows) which has 7GB free. I tried doing it there, but untarring the stage thingy gave a bunch of errors about not being able to create (sym)links. |
No, but FAT32 won't work because it can't store permissions or handle symlinks. You need a linux (ext2/3, reiserfs, jfs, xfs) partition.
Illissius wrote: | (2) What, if any, is the difference between a Knoppix kernel, a kernel generated with genkernel, and one you create by just editing the .config by hand? So, basically, I want whatever has the highest compatibility, except I want to patch it with the staircase scheduler - which option would that be? |
Genkernel just generates a config and compiles a generic kernel - you can use any sources you want with it. If you choose, use development-sources and manually patch it, then use genkernel to configure it - I think the staircase scheduler doesn't require a new config option. The knoppix kernel is premade though, so unless you figure out what patches the knoppix kernel has, you have to stick with whatever they patched it with and however they configured it (which is probably pretty well) even if they have no staircase support. |
|
Back to top |
|
|
chunderbunny Veteran
Joined: 31 May 2004 Posts: 1281 Location: 51°24'27" N, 0°57'15" W
|
Posted: Mon Nov 01, 2004 11:02 pm Post subject: |
|
|
The point about Genkernel and the Knoppix is that they use automatic hardware detection scripts to load the correct kernel modules. In order to use the kernel on any system you will need to get hold of (or write) a hardware detection script and have it load all the appropriate kernel modules, the kernel on it's own will only be optimised for one system. |
|
Back to top |
|
|
fxlamare n00b
Joined: 11 Dec 2002 Posts: 36 Location: LILLE, France
|
Posted: Mon Nov 01, 2004 11:25 pm Post subject: What if I wan't it on a USB stick |
|
|
Hi !
Followed this howto but did not test it yet.
What if we want to boot from USB sticks ?
My hardware is able to boot from USB (I don't have any floppy drive, nor CD-ROM on it)
I guess we must setup some USB-related stuffs inside the kernel :
usb-[u,o,e]hci
usb-storage
SCSI sub system
Disk support
... and we must modify grub.conf and fstab files accordingly.
Won't have time to do this right now, but if someone can elaborate on this in the mean time (hey guys it's O:18AM here in France, but thanks to the time shift it's your turn to work
I also guess some tips about this may be present in the forums...
Thank you all anyway !
... and happy halloween ! |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Tue Nov 02, 2004 11:46 am Post subject: |
|
|
Illissius wrote: |
(1) Is it required to do this in your home directory? I only have ~1GB of space free on / which includes /home, but I also have /misc (FAT32, for files I want to access from windows) which has 7GB free. I tried doing it there, but untarring the stage thingy gave a bunch of errors about not being able to create (sym)links.
|
One workaround would be to use a loop device on an image stored on that FAT32 space. Here's how:
Code: |
touch /misc/my.img
dd if=/dev/zero of=/misc/my.img bs=1M count=4000
mke2fs /misc/my.img
mount -o loop /misc/my.img ~/livecd
|
This will give you 'livecd' under your home, with ext2 fileysystem, and with 4GB of free space.
Illissius wrote: |
(2) What, if any, is the difference between a Knoppix kernel, a kernel generated with genkernel, and one you create by just editing the .config by hand? So, basically, I want whatever has the highest compatibility, except I want to patch it with the staircase scheduler - which option would that be?
|
All are just kernels. Compatibility is achieved by creating a modular kernel (one that has most things compiled as modules) with support for every possible piece of hardware. You don't need genkernel or knoppix to do that, just 'make menuconfig'.
For hardware detection, you could try something like 'kudzu'. I never used it. All I have on my LiveCD is 'udev' and 'hotplug' enabled, and it works fine for me.
Illissius wrote: |
(3) Is there any way to tell how big the stuff in the source directory will be after it's squashed? ie, you have 700MB of (compressed) space on the CD; how much actual space in the source directory does that translate to? |
None to my knowledge (Anyone, correct me if I'm mistaken). Because it highly depends on the nature of files you are going to squash (size for example). So, there's no hard coded formula to calculate the resultant squashed file size. After you take a couple of rounds at squashing your 'source', you might get a rough figure on that. |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Tue Nov 02, 2004 11:51 am Post subject: Re: What if I wan't it on a USB stick |
|
|
fxlamare wrote: |
(hey guys it's O:18AM here in France, but thanks to the time shift it's your turn to work
|
What's "O:18AM"? Is it a military time code? |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Tue Nov 02, 2004 5:36 pm Post subject: |
|
|
Just figured why 'konsole' won't work when testing kde from the chroot environment.
Fix: Updated 'work' script by adding
Code: |
mount -o bind /dev/pts source/dev/pts
|
Not sure if anyone is experiencing same problem or it's just me |
|
Back to top |
|
|
nsahoo l33t
Joined: 17 Jul 2003 Posts: 618
|
Posted: Tue Nov 02, 2004 5:57 pm Post subject: |
|
|
thanks veezi, you are indeed "tux' lil helper"
edit: is there a way to make sure that the image is alright before burning it onto the cd ? |
|
Back to top |
|
|
nsahoo l33t
Joined: 17 Jul 2003 Posts: 618
|
Posted: Tue Nov 02, 2004 8:04 pm Post subject: |
|
|
Quote: |
3. initrd support, set size to 8MB
|
you meant size of the ram disk, .. right ?
I was a little confused 'cause, there were two options
one for ramdisk support
one for Initial ramdisk support, called initrd. |
|
Back to top |
|
|
nsahoo l33t
Joined: 17 Jul 2003 Posts: 618
|
Posted: Tue Nov 02, 2004 10:00 pm Post subject: |
|
|
I can remove /usr/src/* after kernel installation, can't i ? I mean before doing squashfs? 'cause it's 342 M |
|
Back to top |
|
|
chunderbunny Veteran
Joined: 31 May 2004 Posts: 1281 Location: 51°24'27" N, 0°57'15" W
|
Posted: Tue Nov 02, 2004 10:05 pm Post subject: |
|
|
Sure, but if you want to keep it there but leave it off the liveCD you can exclude it during the Squashfs procedure. Simply change the "build" script from Code: | mksquashfs source/ target/files/source.img | to Code: | mksquashfs source/ target/files/source.img -e usr/src |
Personally I like to exclude a few directories Code: | mksquashfs source/ target/files/source.img -e usr/src usr/portage usr/lib/gcc-lib |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|