Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

  1. #1
    Join Date
    Oct 2010
    Location
    Cork, Ireland
    Beans
    18
    Distro
    Kubuntu 11.04 Natty Narwhal

    Question Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    I am trying to install grub boot loader on a partition /dev/sda3 (ext3 formatted), but it is not showing as an option when I run dpkg-reconfigure grub-pc.
    My details are: I have a dual boot system set up with windows fully encrypted on sda1. It is encrypted using truecrypt, so truecrypt is required on the mbr of sda. I will briefly outline the steps I have taken (NB- This is dangerous, backup your boot sector first, or even better your whole HDD):

    • Encrypted windows on sda1 using truecrypt
    • Ubuntu 12.04 installed on extended partition sda5 (within sda2) I need a logical partition to install grub, it will not work on extended) - so I shrunk sda5 by 20 MiB and then shrunk sda2 by the same
    • This allowed me to create a new logical partition sda3. I formatted it as ext3 and gave it the boot flag
    • I started up a live boot disk, mounted /dev/sda5 to /mnt, and installed grub using
      Code:
       grub-install --force --root-directory=/mnt /dev/sda3
    • This allowed me to restart and boot into ubuntu normally, happy days.

    At this point, after I boot into ubuntu normally, I usually run dpkg-reconfigure grub-pc. If I don't do this, any update to grub, or a new kernel, will overwrite the main mbr of sda. In ubuntu 10.04 this is fine, I go through the menu, and it usually gives me the option to install grub onto whatever partition I want, but now, when I run it, it only gives me two options: /dev/sda or /dev/sda5 (/dev/sda3 is missing).
    Have I taken a step which stops /dev/sda3 showing up in this menu? Is there a way to fix this, or could you tell me how I can manually change the debconfig properties to get grub to install to /dev/sda3 by default.
    Thank you!

    NB.I posted this on askubuntu, but there is so little traffic, I was hoping somone might be able to shed some light, even if they could explain how to manually change debconf values for grub-pc

  2. #2
    Join Date
    Oct 2010
    Location
    Cork, Ireland
    Beans
    18
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    I used http://feeding.cloud.geek.nz/2010/10...ttings-on.html to manually set the dpkg (debconfig) flag. I had to use this command (nb. this is dangerous, dont use this as a copy paste solution)

    echo "set grub-pc/install_devices /dev/disk/by-id/ata-TOSHIBA_MK1646GSX_481JF04DS-part3" | debconf-communicate

    There is more detail in the link above which should help with most debconf issues

  3. #3
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    Your dpkg command should have reset your reinstall location.

    #To see what drive grub2 uses see this line - grub-pc/install_devices:
    sudo debconf-show grub-pc

    This does let you select partitions, although not normally recommended. Your case with Truecrypt is one of the exceptions.

    #to get grub2 to remember where to reinstall on updates:
    sudo dpkg-reconfigure grub-pc
    #Enter thru first pages,spacebar to choose/unchoose drive, enter to accept, do not (normally) choose partitions
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #4
    Join Date
    Oct 2010
    Location
    Cork, Ireland
    Beans
    18
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    Hi Oldfred,

    Quote Originally Posted by oldfred View Post
    #to get grub2 to remember where to reinstall on updates:
    sudo dpkg-reconfigure grub-pc
    #Enter thru first pages,spacebar to choose/unchoose drive, enter to accept, do not (normally) choose partitions
    This is the way I usually have done this task in the past, but this time the menu was missing one of my partitions. I'm not sure if the partition was missing a flag, or if it was because I created the partition after I installed kubuntu. I suspect the latter, but for the life of me I could not find where ubuntu had a list of the partitions (like a device.map) nor how to update that list. I agree with you that it would be better to be able to configure through the menu as opposed to manually accessing debconf.

  5. #5
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    A couple of versions ago, grub2 obsoleted device.map, but the commented they would use it if found. If you have an old device.map that might cause issues?

    Grub2 just scans for all drives & partitions. Not sure if it just looks at partition table or scans system.

    But most Linux tools do not see partitions they cannot mount. So if it has issues then it may not be shown.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #6
    Join Date
    Oct 2010
    Location
    Cork, Ireland
    Beans
    18
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    Hi Oldfred,
    I appreciate the help. It was a brand new 12.04 install, on a disk already containing win xp, so there was no device.map. I thought the "device.map" held info on the disks, and not the actual partitions anyway. I thought mounting/formatting may be a problem, so I tried the partition as both ext2 and ext3, and also mounted and unmounted (using /etc/fstab).
    Unfortunately I am no coder so I cannot check the logic behind the dpkg-reconfigure installation location menu. To be honest I am not sure if this is even a grub issue, as grub installs fine on the sda3 partition (I tested by wiping the partition boot sector using dd, and just using muon to reinstall grub).
    In this case it would be good to know where dpkg-reconfigure gets its menu items from.
    Last edited by roomey; May 18th, 2012 at 08:45 AM. Reason: brackets were added

  7. #7
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    Post this as then we can see where everything is installed.

    Boot Info Script courtesy of forum members meierfra & Gert Hulselmans
    Boot Info Script 0.61 is released April 2, 2012
    boot_info_script.sh" file renamed to "bootinfoscript
    http://sourceforge.net/projects/boot...foscript/0.61/
    Page with instructions and link to above new download:
    http://bootinfoscript.sourceforge.net/
    Paste contents of results.txt in a New Reply, then highlight entire file and click on # in edit panel(code tags) to make it easier to read.
    Or You can generate the tags first by pressing the # icon in the New Reply Edit toolbar and then paste the contents between the generated [ code] paste here [ /code] tags.
    Install these before running script:
    sudo apt-get install gawk
    sudo apt-get install xz-utils
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  8. #8
    Join Date
    Oct 2010
    Location
    Cork, Ireland
    Beans
    18
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    Hi Oldfred,
    Sorry for the delay, it is a company laptop unfortunately so I havent had access to it for the last week. From memory everything is installed like so (NB, partition numbers are out of order, (due to me creating the third partition after everything was installed) The HDD is partitioned as below (in this order):

    /dev/sda - mbr = Truecrypt boot loader
    /dev/sda1 = encrypted partition (win vista)(boot flag)
    /dev/sda3 = 20mb ext3 used for grub boot loader
    (partition 2 is extended, and includes)
    /dev/sda5 = / ext4 main ubuntu install
    /dev/sda6 = 2GB encrypted swap

  9. #9
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    Boot-Repair also will force an install of the grub2 boot loader to a PBR.

    Boot Repair:
    https://help.ubuntu.com/community/Boot-Repair
    You can repair many boot issues with this or 'Create BootInfo' report & post the link it creates, so we can see your exact configuration.

    Another choice is just use a USB flash drive to boot Ubuntu, if you have the choice in BIOS. If system it really locked down (like it should be, if security is a major concern) then you may not have that choice.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  10. #10
    Join Date
    Oct 2010
    Location
    Cork, Ireland
    Beans
    18
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Partition not showing in dpkg-reconfigure grub-pc (grub2) menu

    Quote Originally Posted by oldfred View Post
    Boot-Repair also will force an install of the grub2 boot loader to a PBR.
    Hi Oldfred,
    Thanks for your help with this. The system is working fine now, there is no outstanding problem, so I deffo dont want to re-install any boot loaders!

    No, my real question is why dpkg-reconfigure grub-pc did not give /dev/sda3 (a valid ext3 partition) as an option. Perhaps it has some sort of sanity check which does not display geometrically out of order partitions. I dont know where to begin looking for the answer however, not sure if the problem is with grub or dpkg-reconfigure

Page 1 of 2 12 LastLast

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
  •