public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: walt <w41ter@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user]  Re: Inconsistent mountpoint for /
Date: Sat, 11 Jul 2009 12:33:36 -0700	[thread overview]
Message-ID: <h3apeh$70n$1@ger.gmane.org> (raw)
In-Reply-To: <200907111708.50295.wonko@wonkology.org>

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.




  parent reply	other threads:[~2009-07-11 19:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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       ` walt [this message]
2009-07-11 21:59         ` [gentoo-user] " Neil Bothwick
2009-07-12  3:27           ` Alan E. Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='h3apeh$70n$1@ger.gmane.org' \
    --to=w41ter@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox