-   Linux - Software (
-   -   Grub/Lilo/Syslinux on /dev/sda1 (

phantom_cyph 06-13-2008 04:57 PM

Grub/Lilo/Syslinux on /dev/sda1
OK, to know what I am trying to do, here is a history of my pursuits:

I was trying to install a Linux distribution on my Compact Flash card to use on my tablet pc. It had to be able to install programs on as I need to put on the touchscreen and wifi drivers. So, I came across ThinStation, which besides being made to control other computers, can be used as an actual distribution.

ThinStation didn't work out originally as when I found a tutorial with a complete system, it froze when trying to configure the network card (the only network card is the wireless PCMCIA card). During this install, I downloaded SysLinux and used the SysLinux/mtools/syslinux binary to install syslinux to /dev/sda (my CF card). I was not supposed to compile Syslinux, so I didn't.

Since ThinStation didn't work, I replaced the kernel (vmlinuz) with my current 12.1 huge smp kernel and deleted the initrd as well as the line concerning it in the syslinux.conf file. This booted the kernel VERY fast.. until I got the message:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (8, 2)
Now, I figured it had something to do with the fact the partition had to be formatted to vfat, and since I am now a Slacker at heart, I decided to reformat to ext3 and do it again. The problem is, I think the binary in SysLinux/mtools is only for vfat partitions.

So, essentially, how do I get Grub, Lilo, or SysLinux to install on /dev/sda and configure it to boot? As well as, I need a bash shell and dhcp so I can download the programs I need. I don't know if its possible to only install a kernel, bash, and dhcpcd as I have never really gotten that "deep" before, but I would certainly appreciate any help I am offered.


phantom_cyph 06-13-2008 06:10 PM

Just realized I would (obviously) need gcc and wget to download sources and install them.

pinniped 06-13-2008 06:25 PM

If you boot without initrd, the kernel MUST have all drivers necessary for booting compiled into the kernel, not a module. This includes any bus drivers and filesystem drivers for filesystems than need to be accessed to mount the root partition. Once the root partition is mounted, then you can proceed to load other drivers (ethernet etc).

phantom_cyph 06-13-2008 10:15 PM

Well, I made the initrd.gz with the following command:

mkinitrd -c -k vmlinuz-huge-smp- -m ext3 -f ext3 -r /dev/sda1

Here is my full error:

VFS: Cannot open root device "<NULL>" or unknown-block(8,2)
Please append a correct "root=" boot option; here are the several available partitions:
0300    125184 hda driver: ide-disk
  0301    125168 hda1
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2)

Here is my syslinux.cfg:

timeout 0
default vmlinuz
append loadramdisk=1
ramdisk_size=262144 splash=silent vga=791

The only other errors I get are right after it unzips vmlinuz:

Missing parameter in configuration file.
Missing parameter in configuration file.
Missing parameter in configuration file.
Unknown keyword in configuration file.

I hope someone knows how to make this work, cause I am not having any there by any chance a SysLinux installer besides /mtools/syslinux? Given it requires a vfat partition. I wonder if I actually need ext3 but syslinux won't install to it.

pinniped 06-14-2008 01:32 AM

Well, obviously 'grub' starts up. The trick is to press a key to interrupt grub, then use grub's "find" command to locate where the boot device is and specify a suitable root= option.

The CF may be '/dev/sda' on the computer you use to write to the CF with, but on the computer that boots from the CF it may be '/dev/hda' - or hdb, or sdb. Are there any special jumpers you need to put in to make the CF the IDE "master" device?

phantom_cyph 06-14-2008 08:56 AM

No...see, first of all, I'm using syslinux on it right now, not grub. Secondly, my configs are set up for hda1, which is (obviously) what the table reads it as, given there is no other boot media plugged into it.

All times are GMT -5. The time now is 05:13 PM.