[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The Fine Art of Making a Bootable Drive



On Mon, Aug 4, 2014 at 10:57 AM, Martin G. McCormick
<martin@server1.shellworld.net> wrote:
> Tom H writes:
>>
>> Are you mounting "/mnt/{dev,proc,sys}" before chrooting?
>
> No. I did try the mount command after chrooting which successfully ran, but
> didn't fix the missing /dev. I bet this is the crux of the
> problem, however. Mount just mounts everything in /etc/fstab. I
> don't remember if dev is there but /proc is there for sure
>         When I mount /dev/sdf1 on /mnt and do a ls -l /dev/sda,
> it looks good.
>
> brw-rw---- 1 root disk 8, 0 Jul 28 19:09 sda
>
>         Do I need to mount those befor chrooting?
>
>         The only thing I am concerned about is of course is not
> overwriting the good boot sector on the old drive.:-(

You need to mount these filesystems within the chroot for it to be functional.

"/dev/sda" won't be accessible once you enter the chroot. You need to
have "/mnt/dev/sda".

Just in case you don't believe me, here are two links.

The Gentoo installation manual (just under "Mounting the necessary
Filesystems"):

https://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=6#doc_chap1

The Arch install instructions:

https://wiki.archlinux.org/index.php/Install_from_Existing_Linux

The Arch installation script (the "api_fs_mount" function):

https://projects.archlinux.org/arch-install-scripts.git/tree/common

(I'm surprised that Gentoo rbinds "/sys"; it wasn't there when I last
looked at the handbook - possibly a few years ago; I usually don't
even bind it. I'm suprised that Arch doesn't bind "/dev"; I've never
seen this before.)

The way that I ensure that I'm running grub-install on the right disk
is to run blkid to see which filesystem is on which disk.


Reply to: