LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Lilo not booting slackware correctly. Errors listed inside. (https://www.linuxquestions.org/questions/slackware-14/lilo-not-booting-slackware-correctly-errors-listed-inside-792381/)

1349 03-01-2010 12:17 PM

Lilo not booting slackware correctly. Errors listed inside.
 
I'm fairly new to Linux so I'm going to need a step-by-step guide to get me out of this rut. The install of Linux was fine but when I booted up I got this error.

VFS: Cannot open root device "302" or unknown-block (3,2)

Please append a correct "root=" boot option;
here are the available partitions;

0800 78150744 sda driver:sd
0801 47428608 sda1 <-- this is my Windows partition
0802 30719552 sda2 <-- this is my Linux partition
0b00 1048575 sr0 driver:sr
0b01 1048575 sr1 driver:sr

Kernel panic - not syncing:VFS:Unable to mount root fs on unknown-block (3,2)

I guessed from reading this error Lilo isn't pointing to the right partition to boot from? How will I fix this? I read another thread about boot problems on these forums and a guy said to do this:

#mkdir /slacktemp
#mount /dev/device /slacktemp
#chroot /slacktemp
#cd /slacktemp/etc <-- for me it told me that doesn't exist
#vi lilo.conf <-- couldn't do nothing and was frozen
#lilo -v -t -b /dev/device
#lilo -v -b /dev/device

The above solution did not work for me. Can anyone shed a light on a Linux rookie?

W34p0n-X 03-01-2010 12:24 PM

put the output of

# cat /etc/lilo.conf

for this simply mount the /dev/sda2 on /mnt then use the command.

for mounting use

#mount /dev/sda2 /mnt

also put the output of

#fdisk -l

1349 03-01-2010 12:57 PM

I think things just got interesting W34p0n-X. First off, thanks for the speedy response. These are the results from my last adventure.

#cat /etc/lilo.conf

cat: can't open '/ect/lilo.conf' : No such file or directory

#fdisk -l

Disk /dev/hda : 80.0GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065*512=8225280 bytes
Disk identifier : 0xc4b3c4b3

Device Boot Start End Blocks ID System

/dev/hda1 * 1 5905 47428608+ 7 HPFS/NTFS

/dev/hda2 * 5905 9729 30719552+ 83 Linux

Prehistorik 03-01-2010 01:01 PM

Well... I guess those commands shouldn't work quite right. Can you try the following:

Code:

mkdir /slacktemp
mount /dev/hda2 /slacktemp

(/dev/hda2 is your Linux partition, isn't it?)
Code:

ls /slacktemp/etc
(this command must show you a list of files, not an error - if it does not, something gone wrong)
Code:

cd /slacktemp
mkdir -p dev proc sys
mount --bind /dev dev
mount --bind /proc proc
mount --bind /sys sys
chroot .
vi /etc/lilo.conf

Have you ever used Vi? It's not as simple, nor it is a rocket science. After you're entered this command, press 'i'. Now you're in the insert mode. You can insert, delete or change your text in this mode as usual.

Find the section which loads your kernel. Something like:

Code:

image = /boot/vmlinuz
    label = Displayed_Name
    root = /dev/hda1

Here '/dev/hda1' (may look different) is the device the kernel tries to mount as a root file system. Delete it and replace it with /dev/hda2. Add a line with 'root=/dev/hda2' with a few leading spaces if it does not already exist.

Press Esc (it usually works) after you're done with editing. Type ':w' (yes, with a colon), then press Enter. Vi will tell you the file is saved. Then type ':q', Enter. Vi will exit after that.

Code:

lilo -v -t -b /dev/hda2
lilo -v -b /dev/hda2

The first of the above commands may check if anything goes wrong without actually modifying anything. If anything is allright you may issue the second one. It will make Lilo write a boot sector to Linux partition. You may also do something to make your Windows boot loader boot from Linux partition, but it's just another story :)

After all above actions are performed, a few commands are left:

Code:

exit
umount dev proc sys
cd ..
umount slacktemp


W34p0n-X 03-01-2010 01:08 PM

The error you are getting

cat: can't open '/ect/lilo.conf' : No such file or directory (check the filename here,it's /etc/lilo.conf not the /ect/lilo.conf)

use the correct syntax and post the output


#cat /etc/lilo.conf

1349 03-01-2010 01:14 PM

Alright Prehistorik, I'll be back shortly with results.

onebuck 03-01-2010 01:19 PM

Hi,
Quote:

Originally Posted by 1349 (Post 3881260)
I'm fairly new to Linux so I'm going to need a step-by-step guide to get me out of this rut. The install of Linux was fine but when I booted up I got this error.

VFS: Cannot open root device "302" or unknown-block (3,2)

Please append a correct "root=" boot option;
here are the available partitions;

0800 78150744 sda driver:sd
0801 47428608 sda1 <-- this is my Windows partition
0802 30719552 sda2 <-- this is my Linux partition
0b00 1048575 sr0 driver:sr
0b01 1048575 sr1 driver:sr

Kernel panic - not syncing:VFS:Unable to mount root fs on unknown-block (3,2)

I guessed from reading this error Lilo isn't pointing to the right partition to boot from? How will I fix this? I read another thread about boot problems on these forums and a guy said to do this:

#mkdir /slacktemp
#mount /dev/device /slacktemp
#chroot /slacktemp
#cd /slacktemp/etc <-- for me it told me that doesn't exist
#vi lilo.conf <-- couldn't do nothing and was frozen
#lilo -v -t -b /dev/device
#lilo -v -b /dev/device

The above solution did not work for me. Can anyone shed a light on a Linux rookie?

You would use 'mount /dev/sda2 /slacktemp' in the above. If you used 'mount /dev/device /slacktemp' then the device would not be correct. The comment stated that you would need to change to your device.
:hattip:

1349 03-01-2010 01:33 PM

vi has shown me
image = /boot/vmlinuz
label = Linux
root = /dev/hda2

so it is pointing to the right direction. also to the people saying that i actually typed in mounting on device i didn't, i did it correct lol.

1349 03-01-2010 01:40 PM

Also I'm about to post that output of lilo.conf for you weapon.

Uh no matter how I spelled it it doesn't exist it says.

1349 03-01-2010 02:01 PM

Any new suggestions?

samac 03-01-2010 02:15 PM

Did you do a full install?

Did you install lilo in the install sequence.

I would boot using the install DVD, following the instructions on the splash screen, then as root install lilo. Then run lilo. Then reboot.

samac

1349 03-01-2010 02:26 PM

yeah i did a full install and installed lilo after it was done like it guided me too. let me try this again then.

samac 03-01-2010 02:29 PM

Did you install to the MBR?

samac

1349 03-01-2010 02:36 PM

Yes. I'm about to just quit on slack and lilo. Probably the worst bootloader I ever dealt with. I have installed Gentoo easier than I had with slack and Gentoo is a horrid distro that breaks with every update. Can I installed GRUB and make this work? Lilo seems to be the worse damn bootloader I have ever dealt with.

samac 03-01-2010 02:40 PM

Lilo is wonderful, it is elegant and simple and works, but if you are happier with grub you can install it. I would however point out that grub is a 32-bit program and you will have to install 32-bit extensions if you are using Slackware64.

Best of luck with whatever you choose.

samac


All times are GMT -5. The time now is 12:17 PM.