LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   With new kernel the device names are changed and lilo still looks for old device (http://www.linuxquestions.org/questions/slackware-14/with-new-kernel-the-device-names-are-changed-and-lilo-still-looks-for-old-device-805049/)

timetraveler 04-29-2010 05:48 PM

With new kernel the device names are changed and lilo still looks for old device
 
With my stock install kernel for sw 13 my boot device = /dev/hdc1

Now I built a new kernel from 2.6.33.3 and that device is seen as /dev/sdb1

If I try to change the new lilo entry for the new kernel to root=/dev/sdb1 and run lilo it fails.

I tried making an initrd but that only boots so far until the system looks for hdc1

Does anyone know a way out of this rabbit hole?

Alien Bob 04-29-2010 06:14 PM

Read this: http://alien.slackbook.org/blog/robb...tchover-howto/

Eric

timetraveler 04-29-2010 06:26 PM

I had tried this but was still picking up hdc1.

I am now looking into rdev that is mentioned in lilo.conf man page.
I will probably rebuild the kernel and specify the ROOT_DEV

from lilo.conf man page:

"root=root-device
This specifies the device that should be mounted as root. If the special name current is used, the root device is set to the device on which the root file system is currently mounted. If the root has been changed with -r , the respective device is used. If the variable 'root' is omitted, the root device setting contained in the kernel image is used. (And that is set at compile time using the ROOT_DEV variable in the kernel Makefile, and can later be changed with the rdev(8) program.)"

damgar 04-29-2010 06:54 PM

I'm not sure at what point your boot is failing, but have you looked at /etc/fstab. It contains your mount point for the drives that get mounted at boot. It's possible that fstab is still calling the drive hdc1?

aocab 04-29-2010 07:11 PM

@timetraveler,

you mention that when you tried to run lilo after making the change from hdx to sdx...that it failed...so I am assuming that when you ran lilo that you were still running under the older kernel?...and have not yet been able to boot into the new kernel?...

if the above is correct...and you are booting with a kernel that uses hdx (instead of sdx)...then change the entries in fstab to use hdx entries.

run lilo...reboot...and when you select the new kernel (the one that uses sdx)....press tab and add root=/dev/sdb1

that should get you in with the new kernel where you can then change the fstab entries to sdx...run lilo...reboot...

HTH

timetraveler 04-29-2010 09:08 PM

I edited /etc/fstab and changed the
/dev/hdc1 -> /dev/sdb1 and I can boot into the new kernel.

But now the same problem exists for the old kernel.

Which is ok for now since the new kernel is working.

I was not able to run lilo but it doesn't matter.

This is very funky.

timetraveler 04-29-2010 09:40 PM

Actually when I booted to the new kernel by pressing tab at lilo screen and adding root=/dev/sdb1
it boots me into a read-only system. Even though mount command shows "/" mounted read-write.

It has been really hard to get this all going. I don't have a solution but it seems to me that making the installation process easy should be important to the project.

Also I found that now that I'm in the new kernel that lilo -I does not work.

As a reminder I am installing to a 4GB CF card, I have no swap and I mount ext4 with noatime.
Perhaps this is an odd enough setup to be causing some of my issues.

Well at least I've got my custom kernel to support my hardware and I am now getting ready to
try X as I have just got the source for the display driver for VX800 - Chrome9 driver.

So lots of progress thanks to you all.

timetraveler 04-29-2010 09:44 PM

Just to close this out for anyone else that might encounter this.
rdev and recompiling with an altered ROOT_DEV in the kernel source (arch/x86/Makefile) did not
work as rdev and the kernel compile looked for the device but didn't find it. (i.e. /dev/sdb1)

Alien Bob 04-30-2010 06:02 AM

Quote:

Originally Posted by timetraveler (Post 3952482)
I edited /etc/fstab and changed the
/dev/hdc1 -> /dev/sdb1 and I can boot into the new kernel.

But now the same problem exists for the old kernel.

Which is ok for now since the new kernel is working.

I was not able to run lilo but it doesn't matter.

This is very funky.

You can change /etc/fstab so that it works with both your old kernel (root on /dev/hdc1) and the new kernel (root on /dev/sdb1).

Use
Code:

blkid /dev/sdb1
to find out the UUID for this partition, and then use that to change the line in /etc/fstab that mounts the root partition.

Suppose that command returns this text:
Code:

/dev/sdb1: UUID="050a82e7-9346-4de9-953b-1d4e93973b9c" TYPE="ext3"
Something like
Code:

/dev/sdb1  /  ext3  defaults  1  1
would then become
Code:

UUID=050a82e7-9346-4de9-953b-1d4e93973b9c  /  ext3  defaults  1  1
This method is independant of device naming or filesystems and will help you make your computer boot with all kernels.

Eric

aocab 04-30-2010 01:52 PM

Quote:

Originally Posted by Alien Bob (Post 3952785)
You can change /etc/fstab so that it works with both your old kernel (root on /dev/hdc1) and the new kernel (root on /dev/sdb1).

Eric

I was wondering about that.
Good to know.
Thanks:)

timetraveler 04-30-2010 03:15 PM

Thanks alien bob, er, uh, Eric, I will try that. That should solve the "rabbit holiness" of this issue.


All times are GMT -5. The time now is 01:55 PM.