LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (http://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Slackware current : boot problem on ata disk (http://www.linuxquestions.org/questions/slackware-installation-40/slackware-current-boot-problem-on-ata-disk-807297/)

carla schneider 05-12-2010 02:14 AM

Slackware current : boot problem on ata disk
 
Booting stops with kernel panic when trying to mount the root fs.


The kernel is huge-smp-2.6.33.3-smp.
This is the lilo.conf , the problem is booting alt_linux which
is a new installation of slackware current on /dev/hda5

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
lba32
boot = /dev/hda
#compact # faster, but won't work on all systems.
delay = 50
vga = normal
# ramdisk = 0 # paranoia setting
# End LILO global section
# Linux bootable partition config begins
# Linux bootable partition config begins
image = /boot/vmlinuz-huge-smp-2.6.27.7-smp
root = /dev/hda6
label =slackw12
append = "max_luns=8"
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
image = /altlnx/boot/vmlinuz
root = /dev/hda5
label =alt_linux
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends

Here the boot screen:
http://yfrog.com/cbpaniccj
The listing on top looks like the partiontions of disk hda,
but it says sda - when there was an other sata disk connected
it was listed as sdb. Could it be that there is now a problem
booting from ata disks ?

Using the lilo and lilo.conf from the new installation
gives the same results, obviously the new kernel cannot
mount the hda5 partition.
Is there any solution except using a sata disk as root device ?

slakmagik 05-12-2010 02:30 AM

This sounds like this:
http://rlworkman.net/howtos/libata-switchover

astrogeek 05-12-2010 02:33 AM

Clearly your drive is being assigned as sda at boot time, so changing the line:

root = /dev/hda5

to

root = /dev/sda5
(And make sure the fstab entries are correct - probably are if new install)

for the alt_linux stanza should make it work.

But just to be clear, I assume that you are managing lilo from the first linux on hda6 and that the kernel running at that time is assigning the drive as hda, so do not change the other instances of 'hda' to 'sda' and you should be OK.

slakmagik 05-12-2010 02:37 AM

If you're installing the loader from the older system and it doesn't grok sda5, you should be able to add a line like 'append = "root=/dev/sda5"' to that stanza so the old and new system can agree to disagree.

carla schneider 05-12-2010 02:12 PM

Quote:

Originally Posted by slakmagik (Post 3965387)
If you're installing the loader from the older system and it doesn't grok sda5, you should be able to add a line like 'append = "root=/dev/sda5"' to that stanza so the old and new system can agree to disagree.

That solves the problem , but when a sata disks is connected
I have to use /dev/sdb , when two sata disks are connected /dev/sdc ...
So one has to change lilo.conf and fstab depending on how
many sata disks are connected - not very practical.

astrogeek 05-12-2010 03:53 PM

Quote:

Originally Posted by carla schneider (Post 3966034)
That solves the problem , but when a sata disks is connected
I have to use /dev/sdb , when two sata disks are connected /dev/sdc ...
So one has to change lilo.conf and fstab depending on how
many sata disks are connected - not very practical.

You can use the device UUID to always mount the same device.

append = "root=UUID=xxxxxxxxxxxxxxxx", where "xxxx..." is the UUID of the root device (include quotes in the lilo append line).

You can find the UUID like this (from my current system)...

Code:

# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2010-05-12 04:09 0e7ff4a6-ca3e-4d38-b278-e68de9b7162b -> ../../sda5
lrwxrwxrwx 1 root root 11 2010-05-12 04:09 1532502f-7114-4909-a3eb-1d83429ce0ec -> ../../sda10
lrwxrwxrwx 1 root root 11 2010-05-12 04:09 3936e374-a7b2-4b0f-8a8d-578f8af51284 -> ../../sda11
lrwxrwxrwx 1 root root 10 2010-05-12 04:09 3d632f3b-aacf-4eb6-a843-7409ddd27ef4 -> ../../sda9
lrwxrwxrwx 1 root root 10 2010-05-12 04:09 8189bf49-8fe3-49b1-9fd3-e918b2104186 -> ../../sda8
lrwxrwxrwx 1 root root 10 2010-05-12 04:09 af38f3b8-069e-4074-a718-1a9596239211 -> ../../sda7
lrwxrwxrwx 1 root root 10 2010-05-12 04:09 b65e57b2-81e2-11da-b9de-03c5249d19b2 -> ../../sda6
lrwxrwxrwx 1 root root 10 2010-05-12 04:09 f467713c-98ba-11dd-af55-cd9288478ce2 -> ../../sda1

Copy the UUID of the target partition into the lilo append line AND into your fstab in that partition and you should be all set!

(Example fstab line : UUID=xxxxxxxxxxxx / ext3 defaults 1 1)

You can do a similar thing using labels if you have assigned labels to the partitions, like this...

append = "root=LABEL=alt_linux_root"
fstab : LABEL=alt_linux_root / ext3 defaults 1 1

Either of these will keep the device consistent across different hardware configs.


All times are GMT -5. The time now is 08:04 AM.