Creating simple Fedora LiveCD

Submitted by WithPit
on April 8, 2005 - 4:26pm

Hi all,

I want to create a Fedora LiveCD with Kernel 2.6.9. I first just want a very simple LiveCD which only boots and give be a commandline. So I compiled the kernel with default settings and used busybox with default settings to get support for differt kind of commands.

I stored the files which busybox created and stored them inside an initrd.img which i compressed and but on a cd. Together with isolinux.bin, isolinux.cfg, vmlinuz (the kernel). In isolinux.cfg i put the following

label linux
kernel vmlinuz
append root=/dev/ram0 initrd=initrd.img

When i was booting i get an error that an initial console cannot be created. I made inside the initrd.img a dev directory and copied /dev/console to it. Now the error is gone but a new one is created.

RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 168k freed
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

When i put init=/sbin/init inside the isolinux.cfg nothing is changing. I read on the internet that by default /sbin/init is loaded.

I hope somebody can help me with this. I really want to know how the boot proces is working step by step because a lot of how to guides are putting all lot of useless stuff for me in there livecd but don't explain what is really important. I am using linux for some time now but i want to make a next step to know what is happing behind the scene.

I you give me an answer please remember i was only a fedora gnome user which want to learn more about linux. So not everything is known by me.

Thanx.

Behind the scenes of Linux

Anonymous (not verified)
on
April 9, 2005 - 8:34am

You may want to first try out doing a Linux from Scratch before you try liveCDs to understands bits.

On the liveCD do you have rc scripts needed by /sbin/init?

You could pass init=/bin/sh, if you just want a simple command line interface.

Thanx you for your response.

on
April 9, 2005 - 8:56am

Thanx you for your response. I will look at the linuxfromscratch site. I think that my problem is not the init file but something different because when i change it to /bin/sh i get the same error. Maybe there goes something wrong with mounting the root filesystem on the cd?

Libc

Anonymous (not verified)
on
April 9, 2005 - 10:14am

Make sure initrd has /libc/libc.so.6,/libc/ld-linux.so.2 and /libc/libdl.so.2

Busybox static

on
April 10, 2005 - 4:09pm

Thanx for your response. I changed the compilation of busybox so that no dynamic linking was used. Now the init is found correctly. Get some error with:

Bummer, could not run '/etc/init.d/rcS': Permission denied

Will have a look at this error to see what is the problem. But i am a step farther. Thanx

Permissions

Anonymous (not verified)
on
April 11, 2005 - 3:38am

You need to set the execute bit on /etc/init.d/rcS in initrd. I believe it can be done with most file managers (eg Nautilus, Konqueror etc) in GUI -:)

Or something like this from the initrd mount point:

chmod 755 etc/init.d/rcS

Cannot log in

on
April 11, 2005 - 2:59pm

Okey also fix that problem. I know get a login prompt like

(none) login:

If I login with root/root (with I have created in the passwd, group, shadow and shadow- files) i get an error that Login incorrect

After three times i get the error
login[196]: invalid password for `UNKNOWN' on `tty1'

Why is there UNKNOWN and not 'root'. And what can be the reason that logging in is not working?

Login

Anonymous (not verified)
on
April 12, 2005 - 9:53am

Try "root" with no slashs.

The login you enter in is searched for in passwd, thus case-sensitive and bit sensitive.

By it saying 'UNKNOWN' it is saying "root/root" does not exist in passwd.

passwd should look similar to:

root:x:0:0:root:/root:/bin/sh

group should look similar to:

root:x:0:

You also need to add /etc/limits, /etc/login.access and /etc/login.defs in initrd.

Make sure /root directory (it can be empty) exist on initrd

setkeycodes problem

on
April 14, 2005 - 1:20am

Also solved the logging in problem. Thanx.

Now the livecd is working but i have some problems with some messages with tell me that keys are not recognized. When i type setkeycodes e059 237 for example (which i found on the internet) then it is outside the range.

How to solve this little thing?

Use kbd instead

Anonymous (not verified)
on
April 14, 2005 - 5:12am

setkeycodes e059 237 works with kbd

Download ftp://ftp.win.tue.nl/pub/linux-local/utils/kbd/kbd-1.12.tar.gz and install it like:

./configure --prefix=/path/to/initrd --disable-nls
make LDFLAGS="-static -s" CFLAGS="-Os -pipe"
make install

WithPit How is this done?

LordZerba (not verified)
on
April 14, 2005 - 1:12pm

I want to create a LiveCD of a Linux install (Fedora Core 3) that I have. I have a very base install with no X windows. I wouldnt need to include BusyBox in the img. Can you give me the step by step to creating this LiveCD from an Install that I currently have up and running?

thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.