LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 12-06-2008, 03:11 PM   #16
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481

/dev/root has always been present as a virtual mount point, even if you never saw it. So has rootfs (compare hthis to the special virtual devices like proc and tmpfs which have no preceeding /dev)
I'm sure Pat understands some of this as he used to use a similar trick with zipslack -it came with a 'universal' pre-made fstab with / mounted on /dev/fd2 which did the same thing -that is it 'just worked', no matter what the real device was -the only thing that mattered was having the right entry in the bootloader conf file or giving the correct device at the boot prompt.
 
Old 12-16-2008, 09:35 PM   #17
dhubsith
Member
 
Registered: Dec 2006
Location: New Mexico, USA
Distribution: Slackware
Posts: 62

Rep: Reputation: 15
I'd really like to get to the bottom of this "/dev/root" business. In theory, it sounds great, I'd like to have a way of booting independent of what the boot device was. But in practice, it only adds a layer of complexity.

My fstab entry looks like this:
/dev/hda1 / reiserfs defaults,noatime 1 1

If I do: mount -l it shows this:
/dev/root on / type reiserfs (rw,noatime)

At Kinfocenter/Storage Devices I see:

Device: /dev/hda1 Type: reiserfs Size: N/A Mount Point: / Free: 0 B Full%: N/A
Device: /dev/root Type: ? Size: 8.0GB Mount Point: / Free: 5.9 GB Full%: 26.5%

So it looks like the / mount point is "claimed" by both /dev/root and /dev/hda1.

I could live with that, except for LILO. If I go to Control Center/System Administration/Boot Manager (LILO)/Operating Systems and hit "Probe" then "Apply" I get: WARNING: the config file is currently NOT ok.

If then I do: Check Configuration I get:
Configuration NOT ok. LILO said:
LILO version 22.8 (test mode), Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2006 John Coffman
Released 19-Feb-2007 and compiled at 12:43:17 on Nov 29 2008.
Reading boot sector from /dev/hda
Using MENU secondary loader
Calling map_insert_data
Fatal: Illegal 'root=' specification: /dev/root

At that point I can go to Expert and manually change all instances of /dev/root to /dev/hda1 then Apply that, and all is well. But why should I have to manually change it?

It appears to me that something else is missing. I should be able to get rid of /dev/hda1 once and for all. But if I change fstab to /dev/root instead of /dev/hda1 I cannot boot at all, in fact I get VERY stuck indeed, have to boot the slackware cd and re-run configure in order to get a working fstab.

Oh, also, there is NO symlink for /dev/root to anything.

I have done a LOT of Google searches but nothing that tells me how to proceed on this. Suggestions would be appreciated.
 
Old 12-17-2008, 02:11 AM   #18
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Sounds like a KDE problem, mostly.
/dev/root is a virtual device like 'proc' or /dev/tcp'. There is no device node in /dev for these things -it's already in the kernel as a virtual device.
 
Old 12-17-2008, 08:46 AM   #19
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
At Kinfocenter/Storage Devices I see:
Quote:
If I go to Control Center/System Administration/Boot Manager (LILO)/Operating Systems and hit "Probe" then "Apply" I get: WARNING: the config file is currently NOT ok.
I really wouldn't trust KDE's gui tools for system administration tasks. I've installed lilo with root=/dev/root entries as a test and it works fine.

Quote:
Oh, also, there is NO symlink for /dev/root to anything.
That's weird - I have a symlink to /dev/sda2 - my root filesystem device.

There is a difference in the way the huge and the generic kernels handle this as mount returns
Code:
/dev/sda2 on /  type ext3
in the generic and
Code:
/dev/root on / type ext3
in the huge kernel. Both kernels however have the symlink /dev/root pointing to /dev/sda2. I have made entries with
Code:
root=/dev/root
in the /etc/lilo.conf for both huge and generic and all works well.

As Gilbert says - this sounds like KDE messing things up.

Quote:
But if I change fstab to /dev/root instead of /dev/hda1 I cannot boot at all, in fact I get VERY stuck indeed, have to boot the slackware cd and re-run configure in order to get a working fstab.
All the above tests were done with the fstab root entry as /dev/sda2 / I then changed this to /dev/root / and it booted both huge and generic kernels ok. Mount still returned /dev/sda2 on / with the generic kernel however.

The only difference seems to be that you are using the reiser filesystem and I have ext3. Don't know if this would cause your behavior but I don't see why it should.
 
Old 12-17-2008, 09:07 AM   #20
randomsel
Member
 
Registered: Oct 2006
Location: Wilmington, DE
Distribution: Slackware 11
Posts: 201

Rep: Reputation: 30
Quote:
Originally Posted by bgeddy View Post
I have made entries with
Code:
root=/dev/root
in the /etc/lilo.conf for both huge and generic and all works well.
how would that work? I'd like to put Slackware in a USB HD, and still find it mystifying how it would know which drive is the root. Would I need to put /boot in the same partition as /?
 
Old 12-17-2008, 10:35 AM   #21
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
First you need to realize that when you pass the root=/dev/whatever in your lilo.cong or grub menu.lst file, this option tells the bootloader where root is, not the kernel. Normally, this entry must agree with the entry in your fstab though. But, if you use a generic device like /dev/root or just 'rootfs' in your fstab, then a successful boot dpends only on the lilo or grub entry being the correct device and it doesn't have to ahve the same name as the generic device in the fstab.
 
Old 12-17-2008, 12:00 PM   #22
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
how would that work? I'd like to put Slackware in a USB HD, and still find it mystifying how it would know which drive is the root. Would I need to put /boot in the same partition as /?
As Gilbert says the /dev/root virtual device doesn't really help here. There was a long thread discussing ways round this here which may be useful to you. My examples were merely to show that /dev/root will work as a lilo and fstab option.

As an experiment I changed my fstab in a VM to /dev/root / and removed the swap file reference. I added root=/dev/root to lilo.conf and reinstalled. That booted ok as I already stated. Now for the fun bit - I changed the disk controller in the VM to be IDE primary master rather than SATA to force the device to change to /dev/hd? from /dev/sd? . Then at boot up I tabbed into the lilo menu and gave the kernel the additional boot time parameter of "root=/dev/hda2" and it booted ok mounting /dev/hda2 as the root file system device. So no real miracles there then. The obvious drawback being I needed to know about what device it was going to be given to tell the kernel. All the /dev/root symlink really solved was fstab entries. If I don't tell the kernel where the root device is I get a kernel panic "VFS: cannot open root device "802" or uknown-block(8,2) Please append a correct "root=" boot option" - and so on. Device 802 is /dev/sda2 on the system.

If I understand this correctly the USB boot disk may show as a different device on different machines. I don't have access to USB devices to play with this but the thread I linked to originally seems relevant.
 
Old 12-17-2008, 05:53 PM   #23
dhubsith
Member
 
Registered: Dec 2006
Location: New Mexico, USA
Distribution: Slackware
Posts: 62

Rep: Reputation: 15
I just tried again to change my fstab. The system absolutely will not boot up if either /dev/root or rootfs is in fstab. It doesn't matter whether /dev/hda1 is there or not. It also doesn't matter if LILO has root=/dev/root or root=/dev/hda1, it won't boot either way. I rescued fstab using the install cd, and now I'm back where I started.

I'm starting to think, as bgeddy suggested, that my problem is a result of using reiserfs, but I also don't see how.
 
Old 12-17-2008, 08:55 PM   #24
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
I'm starting to think, as bgeddy suggested, that my problem is a result of using reiserfs, but I also don't see how.
Hate to be the bearer of bad news but to test out this theory I made a new install of Slackware 12.2 in a VM using reiserfs as the root filesystem. All my previous tests still worked with that filesystem so I think the problem must lie elsewhere.
 
Old 12-17-2008, 09:25 PM   #25
dhubsith
Member
 
Registered: Dec 2006
Location: New Mexico, USA
Distribution: Slackware
Posts: 62

Rep: Reputation: 15
Quote:
Originally Posted by bgeddy View Post
Hate to be the bearer of bad news but to test out this theory I made a new install of Slackware 12.2 in a VM using reiserfs as the root filesystem. All my previous tests still worked with that filesystem so I think the problem must lie elsewhere.
Thanks for letting me know. I guess I'll have to look somewhere else.

I am using my own custom kernel, so I may have left out something there. Or perhaps there is a package I don't have installed that I need.
 
Old 12-18-2008, 12:03 AM   #26
randomsel
Member
 
Registered: Oct 2006
Location: Wilmington, DE
Distribution: Slackware 11
Posts: 201

Rep: Reputation: 30
Quote:
Originally Posted by bgeddy View Post
If I understand this correctly the USB boot disk may show as a different device on different machines. I don't have access to USB devices to play with this but the thread I linked to originally seems relevant.
That is indeed the case. Seems like we still need to add udev to initrd.gz and boot using /dev/disk/by-uuid ...
 
Old 12-21-2008, 10:59 AM   #27
dhubsith
Member
 
Registered: Dec 2006
Location: New Mexico, USA
Distribution: Slackware
Posts: 62

Rep: Reputation: 15
In case anyone is having the same problems I was having, I now have figured out what I was doing wrong.

You have to have THIS configured in the kernel:

CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y

Without it, the symlink from /dev/root never gets created.

I now have LILO working correctly, with root=/dev/root, and my fstab entry looks like this:

/dev/root / reiserfs defaults,noatime 1 1

Hope this saves someone some time and hassle.
 
Old 12-21-2008, 12:04 PM   #28
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
You have to have THIS configured in the kernel:

CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y

Without it, the symlink from /dev/root never gets created.
Thanks for letting us know. I've been looking for that for ages ! BTW, how did you discover that that was the setting to check ? By elimination perhaps ?

Incidentally - there has been an updated mkinitrd script posted in Slackware 12.2 patches that fixes /dev/root being added to an initial ram disk and causing problems with the generic kernels.
 
Old 12-21-2008, 06:34 PM   #29
dhubsith
Member
 
Registered: Dec 2006
Location: New Mexico, USA
Distribution: Slackware
Posts: 62

Rep: Reputation: 15
Quote:
Originally Posted by bgeddy View Post
Thanks for letting us know. I've been looking for that for ages ! BTW, how did you discover that that was the setting to check ? By elimination perhaps ?.
Yes. Once I realized that it worked with huge-smp, and didn't work with my custom kernel, it was just a matter of bisecting the differences.
 
Old 01-19-2009, 05:59 PM   #30
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I discovered another problem with this "/dev/root" syntax. The gparted utility does not recognize the root partition and therefore fails to lock the partition if mounted. I'm using gparted 0.41. I realize gparted is a graphical wrapper for parted, therefore perhaps the problem is with parted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lilo hangs on /dev/hda in -current Uncle_Theodore Slackware 4 09-13-2008 10:53 PM
slackware current question on the current kernels davimint Slackware 3 06-03-2007 08:39 AM
DISCUSSION: Upgrade to Slackware -current without a -current CD truthfatal LinuxAnswers Discussion 0 09-19-2006 02:42 PM
/dev/rtc + udev in current dive Slackware 3 09-02-2006 10:37 PM
Boot Error: Root file system /dev/root adtomar Linux - Networking 0 12-27-2004 11:50 AM


All times are GMT -5. The time now is 10:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration