Results 1 to 2 of 2

Thread: Any way to chroot & update-grub without having grub scan drives outside the chroot?

  1. #1
    Join Date
    May 2009
    Beans
    143

    Smile Any way to chroot & update-grub without having grub scan drives outside the chroot?

    Hi

    I'm replacing a dying drive from my father's laptop. I've cloned it to a new one, which is native 4k as opposed to the old one being 512B, so I needed to repartition the target drive to align the partitions correctly.

    Thus, I need to update grub on the new drive. I don't have the laptop (my father lives in another region of the country), so I'm trying to chroot into it and just run update-grub from there.

    My Ubuntu box has some iSCSI volumes and of course its own Ubuntu installation. All of these are scanned by update-grub, even though none of them appear if I do a df inside the chroot env:

    Code:
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.5.0-31-generic
    Found initrd image: /boot/initrd.img-3.5.0-31-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Microsoft Windows XP Professional on /dev/sdv1
    Found Windows Vista (loader) on /dev/sdw1
    Found Ubuntu 13.04 (13.04) on /dev/sdw3
    Found Windows 7 (loader) on /dev/zd0p1
    Found Windows 7 (loader) on /dev/zd64p1
    Found Windows Vista (loader) on /dev/zd80p1
    done
    /dev/z* ones are my iSCSI volumes. The /dev/sdv1 is an Acer Windows recovery partition on my father's drive. The actual Linux (Ubuntu 13.04) installation I'm chrooting into is on an iSCSI volume under /dev/zvol/ — also seen by the prober here as /dev/zd80 (/dev/sdw is the actual drive I'm going to return to my pa), and I find it a bit interesting that update-grub finds all partitions outside the chroot env, but not the actual chrooted installation itself, which in that env is /dev/sda3:


    Code:
    # df -h
    df: ‘/run/user’: No such file or directory
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda3        19G  4.9G   13G  28% /
    Am I just doing this wrong, or is there some trick to update grub with scanning just the chrooted drive?

    TIA,
    Daniel
    Last edited by DanielBuus; June 13th, 2013 at 08:56 AM. Reason: Formatting

  2. #2
    Join Date
    May 2009
    Beans
    143

    Re: Any way to chroot & update-grub without having grub scan drives outside the chroo

    Okay, as it turns out, I'm not gonna need to do it anyway — the drive booted fine as-is, and it's now in the mail heading for my dad

    Still curious, though, if anyone knows.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •