public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Inconsistent mountpoint for /
@ 2009-07-11  0:16 lngndvs
  2009-07-11  0:52 ` [gentoo-user] " walt
  2009-07-11 13:26 ` [gentoo-user] " Neil Bothwick
  0 siblings, 2 replies; 12+ messages in thread
From: lngndvs @ 2009-07-11  0:16 UTC (permalink / raw
  To: gentoo-user

I recently reported that I am suffering random reboots.  I have now
discovered an inconsistency in the reporting of the mount point of the
root directory of my Gentoo install.  First a little history:

I spent about two and a half weeks trying to install ANYTHING that
would remain stable and useable.  Finally Gentoo is running well.
Repeatedly, I was unable to understand how grub was installing the
MBR, or where.  I had three SATA drives and one ATA drive, and I
removed the ATA drive to get rid of the problem  of naming of drives
inconsistently.  So far so good; however, the SATA drives are booted
in order that they are named in the BIOS, so I wasn't certain which
drive the MBR was being installed on.

Leaving out many details...  Just when I was about to give up, I
discovered that if I changed the boot order, a different grub
appeared.  One from Gentoo and one from Ubuntu.  After a pitched
battle, I was finally able to settle on Gentoo, and it's running
pretty well.  Except for random reboots.  

I just noticed that the return from # df is as follows, without any
specific drive: designation appearing for / :

   spineless ulod # df
   Filesystem           1K-blocks      Used Available Use% Mounted on
   rootfs               105392960  19272948  80766360  20% /
   /dev/root            105392960  19272948  80766360  20% /
   rc-svcdir                 1024        76       948   8% /lib64/rc/init.d
   udev                     10240       212     10028   3% /dev
   shm                    1027568         0   1027568   0% /dev/shm
   /dev/sdb6             62144164  45189664  13797732  77% /home

After some investigation,  I found the following inconsistent
indentification of the / directory's physical location:

   |                            | / partition              |
   | where represented          | 500GB HDD represented as |
   |----------------------------+--------------------------|
   | /boot/grub.conf "root"     | (hd1,0)                   |
   | /boot/grub.con kernel line | root=/dev/sda5           |
   | /etc/fstab                 | /devsdb5/                |
   | /etc/mtab                  | /dev/root                |
   | sfdisk -l                  | /dev/sda5                |
   | /df                        | /dev/root                |
   |                            |                          |


In grub, it is located first  as hd1 (/dev/sdb) and then as
/dev/sda5.  That is where I want it to be.   This is necessary
apparently  because grub would see it on /dev/sdb at first, but once
the kernel boots, the drive would physically be /dev/sda.

The  identifation of this partition in /etc/fstab as /dev/sdb5, is
apparently not being honored?  I'm asking, because I am not well
versed in the events in the boot order.  

df then reports it as /dev/root, ignoring the device id.  The
partition is seen by sfdisk as /dev/sda5, as it also is by gparted.

So, am I safe to rename this partition in /etc/fstab as /dev/sda5?

Secondly, would this help explain random reboots?

I now plan to simplify the arrangement, and reorganize all of the
active partitions on a single drive.  That's another story.

Thank you,

Alan 

 




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [gentoo-user]  Re: Inconsistent mountpoint for /
  2009-07-11  0:16 [gentoo-user] Inconsistent mountpoint for / lngndvs
@ 2009-07-11  0:52 ` walt
  2009-07-11  1:27   ` Alan E. Davis
  2009-07-11 13:26 ` [gentoo-user] " Neil Bothwick
  1 sibling, 1 reply; 12+ messages in thread
From: walt @ 2009-07-11  0:52 UTC (permalink / raw
  To: gentoo-user

On 07/10/2009 05:16 PM, lngndvs@gmail.com wrote:
> I recently reported that I am suffering random reboots.  I have now
> discovered an inconsistency in the reporting of the mount point of the
> root directory of my Gentoo install...

No, the two are not related.  In my experience, anything that goes wrong
at random times is related to hardware flakiness -- usually because some
piece of the hardware is running too hot.

I happen to live in a very hot, dry, dusty place.  I see random flakiness
just about every summer, which I fix by blowing the thick layer of dust
off of the CPU heatsink and RAM chips and the power supply with a can of
compressed gas.  Of course, I also check that all of the fans in the case
are still working.

Do you know about memtest86?  If you have random nastiness you should run
memtest86 at least overnight to see if your RAM is becoming senile ;o)

I have suggestions about grub also, but, to be coherent about them I need
to be much more awake than I am now.  I'll check back tomorrow.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Re: Inconsistent mountpoint for /
  2009-07-11  0:52 ` [gentoo-user] " walt
@ 2009-07-11  1:27   ` Alan E. Davis
  2009-07-11  1:55     ` Dale
  2009-07-11  9:21     ` Peter Humphrey
  0 siblings, 2 replies; 12+ messages in thread
From: Alan E. Davis @ 2009-07-11  1:27 UTC (permalink / raw
  To: gentoo-user

Thank you, Walt.

I live on a tropical island.  I've been going through about all the
suggestions people have made and all the ideas I can think of.
Changed NICs.  Recompiled kernel with better configuration.

Uptime 1:39

An improvement from earlier today.

I've edited /etc/fstab.  But I'll leave grub alone until I'm sure what to do.

Thank you again.

Alan





On Sat, Jul 11, 2009 at 10:52 AM, walt<w41ter@gmail.com> wrote:
> On 07/10/2009 05:16 PM, lngndvs@gmail.com wrote:
>>
>> I recently reported that I am suffering random reboots.  I have now
>> discovered an inconsistency in the reporting of the mount point of the
>> root directory of my Gentoo install...
>
> No, the two are not related.  In my experience, anything that goes wrong
> at random times is related to hardware flakiness -- usually because some
> piece of the hardware is running too hot.
>
> I happen to live in a very hot, dry, dusty place.  I see random flakiness
> just about every summer, which I fix by blowing the thick layer of dust
> off of the CPU heatsink and RAM chips and the power supply with a can of
> compressed gas.  Of course, I also check that all of the fans in the case
> are still working.
>
> Do you know about memtest86?  If you have random nastiness you should run
> memtest86 at least overnight to see if your RAM is becoming senile ;o)
>
> I have suggestions about grub also, but, to be coherent about them I need
> to be much more awake than I am now.  I'll check back tomorrow.
>
>
>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Re: Inconsistent mountpoint for /
  2009-07-11  1:27   ` Alan E. Davis
@ 2009-07-11  1:55     ` Dale
  2009-07-11  9:21     ` Peter Humphrey
  1 sibling, 0 replies; 12+ messages in thread
From: Dale @ 2009-07-11  1:55 UTC (permalink / raw
  To: gentoo-user

Alan E. Davis wrote:
> Thank you, Walt.
>
> I live on a tropical island.  I've been going through about all the
> suggestions people have made and all the ideas I can think of.
> Changed NICs.  Recompiled kernel with better configuration.
>
> Uptime 1:39
>
> An improvement from earlier today.
>
> I've edited /etc/fstab.  But I'll leave grub alone until I'm sure what to do.
>
> Thank you again.
>
> Alan
>
>
>   

I ran into this a long time ago.  I had the wrong IDE chip set selected
in the kernel.  It worked but it was buggy.  It would cause random
crashes when the drive got a little busy.  You can use hdparm -Tt
/dev/your drive to test this.  I usually did a && and ran them several
at a time to really get it going.

This may not be your problem but it may be worth trying if you still
have trouble.

Dale

:-)  :-) 



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Re: Inconsistent mountpoint for /
  2009-07-11  1:27   ` Alan E. Davis
  2009-07-11  1:55     ` Dale
@ 2009-07-11  9:21     ` Peter Humphrey
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Humphrey @ 2009-07-11  9:21 UTC (permalink / raw
  To: gentoo-user

On Saturday 11 July 2009 02:27:09 Alan E. Davis wrote:

> I live on a tropical island.  I've been going through about all the
> suggestions people have made and all the ideas I can think of.

I have an ancient laptop here that used to lock up in the middle of large 
compilations, and eventually I found it was due to a bad ACPI setup. I had 
been suspecting hardware age, but now it's running much better.

-- 
Rgds
Peter



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Inconsistent mountpoint for /
  2009-07-11  0:16 [gentoo-user] Inconsistent mountpoint for / lngndvs
  2009-07-11  0:52 ` [gentoo-user] " walt
@ 2009-07-11 13:26 ` Neil Bothwick
  2009-07-11 14:30   ` Alan E. Davis
  1 sibling, 1 reply; 12+ messages in thread
From: Neil Bothwick @ 2009-07-11 13:26 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

On Sat, 11 Jul 2009 10:16:26 +1000, lngndvs@gmail.com wrote:

> In grub, it is located first  as hd1 (/dev/sdb) and then as
> /dev/sda5.  That is where I want it to be.

Those are two different things. the first is GRUB's root directory, the
place where is will find its configuration and stage files (i.e. the
location of /boot). The root argument on the kernel line is tell the
kernel the location of your root filesystem - /.


-- 
Neil Bothwick

Three kinds of people: those who can count and those who can't.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Inconsistent mountpoint for /
  2009-07-11 13:26 ` [gentoo-user] " Neil Bothwick
@ 2009-07-11 14:30   ` Alan E. Davis
  2009-07-11 15:08     ` Alex Schuster
  0 siblings, 1 reply; 12+ messages in thread
From: Alan E. Davis @ 2009-07-11 14:30 UTC (permalink / raw
  To: gentoo-user

On Sat, Jul 11, 2009 at 11:26 PM, Neil Bothwick<neil@digimed.co.uk> wrote:
> On Sat, 11 Jul 2009 10:16:26 +1000, lngndvs@gmail.com wrote:
>
>> In grub, it is located first  as hd1 (/dev/sdb) and then as
>> /dev/sda5.  That is where I want it to be.
>
> Those are two different things. the first is GRUB's root directory, the
> place where is will find its configuration and stage files (i.e. the
> location of /boot). The root argument on the kernel line is tell the
> kernel the location of your root filesystem - /.
>

I need to have the second drive (SATA #2) as the first boot drive
because that's the drive with the grub setup in the MBR, for Gentoo.

/boot is found on SATA #1, actually /dev/sda1 after all is said and
done.  But until the system boots, it is called (hd1) (same as
/dev/sda2).

As the kernel boots from /boot, it finds / and mounts it.  It is
actually on /dev/sda1, and it is now identified as /dev/sda1.  So this
is what must be in the kernel line.

I had /dev/sdb5 as / in /dev/fstab, but that was wrong, because by
that time, it is /dev/sda5.

I also had /dev/sdb5 as another partition, mounted as an archive, in
my /dev/fstab.  I thought this was causing a problem.  Not sure even
now.

So I changed the fstab to reflect /dev/sdb5 as / .

This problem has been a central issue over two to three weeks.  Now
the system is working.  I'd like to rectify the boot priority so this
drive is booted first, but that requires grub to install the MBR on
that drive.  Not sure why I had so much trouble with that.  It's a
500GB drive.  Is that an issue?

It's all too complicated.  Once it is clear enough in my own head, I
will try to install grub on that drive and set it as the first
priority at boot, in the BIOS.

In 15 years of installing all manner of GNU/Linux, it has only been
the past year or two I've encounted any of this.  It started with
having PATA drives suddently named /dev/sda1, while the former
/dev/sda1 became /dev/sda2.  It was first on Ubuntu.  Now I'm not sure
anymore.

Thanks.  I think that aspect of the problem has been sorted out, or at
least recognized.  It's dizzying.

Alan



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Inconsistent mountpoint for /
  2009-07-11 14:30   ` Alan E. Davis
@ 2009-07-11 15:08     ` Alex Schuster
  2009-07-11 16:59       ` Alex Schuster
  2009-07-11 19:33       ` [gentoo-user] " walt
  0 siblings, 2 replies; 12+ messages in thread
From: Alex Schuster @ 2009-07-11 15:08 UTC (permalink / raw
  To: gentoo-user

Alan E. Davis writes:
> On Sat, Jul 11, 2009 at 11:26 PM, Neil Bothwick<neil@digimed.co.uk> wrote:
> > On Sat, 11 Jul 2009 10:16:26 +1000, lngndvs@gmail.com wrote:
> >> In grub, it is located first  as hd1 (/dev/sdb) and then as
> >> /dev/sda5.  That is where I want it to be.
> >
> > Those are two different things. the first is GRUB's root directory, the
> > place where is will find its configuration and stage files (i.e. the
> > location of /boot). The root argument on the kernel line is tell the
> > kernel the location of your root filesystem - /.
>
> I need to have the second drive (SATA #2) as the first boot drive
> because that's the drive with the grub setup in the MBR, for Gentoo.

Is there a reason why yo keep having grub on #2? If not, I'd just run grub, 
enter
  root (hd0,0)
  setup (hd0)
  quit
, copy /boot/grub/grub.conf over and all should be fine.

If you prefer to leavy it as it is: instead of using the partiton itself 
(like /dev/sda5) in grub.conf and fstab, you could try the /dev/disk-by-
label/<label of your root partition> notation. You can use dumpe2fs -h 
/dev/sda5 to see the label as Filesystem volume name, and tune2fs -L to 
change it. Then it would not matter on which drive the partiton actually is.

	Wonko



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Inconsistent mountpoint for /
  2009-07-11 15:08     ` Alex Schuster
@ 2009-07-11 16:59       ` Alex Schuster
  2009-07-11 19:33       ` [gentoo-user] " walt
  1 sibling, 0 replies; 12+ messages in thread
From: Alex Schuster @ 2009-07-11 16:59 UTC (permalink / raw
  To: gentoo-user

Uh. I wrote:

> Is there a reason why yo keep having grub on #2? If not, I'd just run
> grub, enter
>   root (hd0,0)

This should be (hd1,0), using the same /boot partition as before.

>   setup (hd0)

But the master boot record is on the first drive now.

	Wonko



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [gentoo-user]  Re: Inconsistent mountpoint for /
  2009-07-11 15:08     ` Alex Schuster
  2009-07-11 16:59       ` Alex Schuster
@ 2009-07-11 19:33       ` walt
  2009-07-11 21:59         ` Neil Bothwick
  1 sibling, 1 reply; 12+ messages in thread
From: walt @ 2009-07-11 19:33 UTC (permalink / raw
  To: gentoo-user

On 07/11/2009 08:08 AM, Alex Schuster wrote:
> Alan E. Davis writes:
>> On Sat, Jul 11, 2009 at 11:26 PM, Neil Bothwick<neil@digimed.co.uk>  wrote:
>>> On Sat, 11 Jul 2009 10:16:26 +1000, lngndvs@gmail.com wrote:
>>>> In grub, it is located first  as hd1 (/dev/sdb) and then as
>>>> /dev/sda5.  That is where I want it to be.
>>>
>>> Those are two different things. the first is GRUB's root directory, the
>>> place where is will find its configuration and stage files (i.e. the
>>> location of /boot). The root argument on the kernel line is tell the
>>> kernel the location of your root filesystem - /.
>>
>> I need to have the second drive (SATA #2) as the first boot drive
>> because that's the drive with the grub setup in the MBR, for Gentoo.
>
> Is there a reason why yo keep having grub on #2? If not, I'd just run grub,
> enter
>    root (hd0,0)
>    setup (hd0)
>    quit
> , copy /boot/grub/grub.conf over and all should be fine.
>
> If you prefer to leavy it as it is: instead of using the partiton itself
> (like /dev/sda5) in grub.conf and fstab, you could try the /dev/disk-by-
> label/<label of your root partition>  notation. You can use dumpe2fs -h
> /dev/sda5 to see the label as Filesystem volume name, and tune2fs -L to
> change it. Then it would not matter on which drive the partiton actually is.

Alan, FTR this is pretty much what I was going to suggest.  As you can see
by Alex's amended post, this is a confusing subject and it's all too easy
to make a bad mistake.

The very first thing I do before changing anything is to make a bootable
USB stick or floppy with all of the files needed to install grub, so I can't
lock myself out with my stupid mistakes.

My USB stick, e.g. shows up in grub as (hd2).  Now, I can't possibly think
straight enough to know in advance that the USB stick is (hd2), so what I
do every time is to use this trick from the grub prompt:

grub> root (hd<now I hit TAB for a list of all drives that grub finds>
grub> root (hd<TAB>
Possible disks are:  hd0 hd1 hd2   <that narrows it down to three>

Now for each of the three disks I continue this way:
grub> root (hd0,<TAB to get a list of all partitions on (hd0)>

On the third disk I finally recognize my USB stick because it has only one
partition, but just to be sure:

grub> root (hd2,0)/<TAB to get a list of all directories on the partition>

If by that time I'm still not sure which is the right disk then I'd better
go take a nap before proceeding ;o)

Now I mount the USB stick and make a new directory /boot/grub and into that
I copy all the install files from /lib/grub/i386-pc/

Now you need to install grub onto the USB stick to make it bootable:

grub> root (hd2,0)  <that's where I put the grub install files>
grub> setup (hd2)   <don't specify a partition when running setup!>
grub> quit

You can now boot the USB stick and use it to install grub on a hard disk,
and of course you can use it to boot a machine with grub improperly
installed or configured.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user]  Re: Inconsistent mountpoint for /
  2009-07-11 19:33       ` [gentoo-user] " walt
@ 2009-07-11 21:59         ` Neil Bothwick
  2009-07-12  3:27           ` Alan E. Davis
  0 siblings, 1 reply; 12+ messages in thread
From: Neil Bothwick @ 2009-07-11 21:59 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

On Sat, 11 Jul 2009 12:33:36 -0700, walt wrote:

> My USB stick, e.g. shows up in grub as (hd2).  Now, I can't possibly
> think straight enough to know in advance that the USB stick is (hd2),
> so what I do every time is to use this trick from the grub prompt:
> 
> grub> root (hd<now I hit TAB for a list of all drives that grub finds>
> grub> root (hd<TAB>  
> Possible disks are:  hd0 hd1 hd2   <that narrows it down to three>
> 
> Now for each of the three disks I continue this way:
> grub> root (hd0,<TAB to get a list of all partitions on (hd0)>  
> 
> On the third disk I finally recognize my USB stick because it has only
> one partition, but just to be sure:
> 
> grub> root (hd2,0)/<TAB to get a list of all directories on the
> grub> partition>  
> 
> If by that time I'm still not sure which is the right disk then I'd
> better go take a nap before proceeding ;o)

Or you could use find from the grub prompt. Just put a file identifying
the USB stick in its root directory and find that.


-- 
Neil Bothwick

Computer (n): A device designed to speed and automate errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Re: Inconsistent mountpoint for /
  2009-07-11 21:59         ` Neil Bothwick
@ 2009-07-12  3:27           ` Alan E. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Alan E. Davis @ 2009-07-12  3:27 UTC (permalink / raw
  To: gentoo-user

Thanks to everyone.  I feel like this was so easy, how could I have
been confused?  But I was.  Somehow, I was lost for weeks between the
ways that Ubuntu and Gentoo handle grub---and I was trying to install
unstable ubuntu with grub 2, so that may explain some of it, but not
all, surely.

I used the usbkey.  Installed grub on the drive I WANT to be /dev/sda,
and, what do you know?  It worked.

Thanks.

Alan



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-07-12  3:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-11  0:16 [gentoo-user] Inconsistent mountpoint for / lngndvs
2009-07-11  0:52 ` [gentoo-user] " walt
2009-07-11  1:27   ` Alan E. Davis
2009-07-11  1:55     ` Dale
2009-07-11  9:21     ` Peter Humphrey
2009-07-11 13:26 ` [gentoo-user] " Neil Bothwick
2009-07-11 14:30   ` Alan E. Davis
2009-07-11 15:08     ` Alex Schuster
2009-07-11 16:59       ` Alex Schuster
2009-07-11 19:33       ` [gentoo-user] " walt
2009-07-11 21:59         ` Neil Bothwick
2009-07-12  3:27           ` Alan E. Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox