debian-installer (booted from usb) installs MBR to usb device instead of cciss device

Bug #589483 reported by JohnCollaros
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
debian-installer (Debian)
New
Undecided
Unassigned
debian-installer (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: usb-creator

Hi,

I am creating USB installer of ubuntu-10.04-server-amd64.iso to install onto HP DL360 G6.

When the installer reaches the point where it installs grub, it installs it into the mbr of sda (which is the USB drive you are installing from typically!) It should really be installing into /dev/cciss/c0d0. There doesn't seem to be an option to pick the drive you want to write the boot sector to.

This causes two problems - it renders the usb installer unusable since its bootloader has been wiped, and the server can't boot without the USB drive present, since it doesn't have a bootloader installed locally.

A workaround is to just run grub-install /dev/cciss/c0d0 once the server comes up, but you will have to rebuilt the boot-sector on the USB drive to use it again.

I used usb-creator-gtk on a vanilla install of 10.04-desktop-amd64, and used the ubuntu-10.04-server-amd64.iso image as the image to install to the USB drive.

Revision history for this message
komputes (komputes) wrote :

This is not a bug in usb-creator, but ubiquity (the ubuntu installer). I will reassign this bug to the ubiquity package and mark is as a duplicate of Bug #549756

At the last step of ubiquity click the "Advanced" button, it will say that GRUB will be installed to /dev/sda instead of /dev/sdb. Changing it to /dev/sdb using the contextual menu fails and does not change the drive. You must click on the text field and manually type sdb. If you do this it should work for you.

affects: usb-creator (Ubuntu) → ubiquity (Ubuntu)
Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
komputes (komputes) wrote :

Please ignore the last comment. Although this is still not an issue with usb-creator, since you are using the alternate/server CD, this is an issue with debian-installer not being able to detect the correct drive onto which to install the MBR, assuming sda is the internal drive when in fact it is the USB boot disk.

affects: ubiquity (Ubuntu) → debian-installer (Ubuntu)
Changed in debian-installer (Ubuntu):
status: Confirmed → New
Revision history for this message
komputes (komputes) wrote :

Hello John, I created a startup disk of ubuntu-9.10-server-i386.iso and another of ubuntu-10.04-server-i386.iso. They booted properly, installed properly and afterwards, both the system and key were still bootable independently without the need to rebuild the MBR.

I believe that since you are trying to install Ubuntu onto an HP cciss RAID array, the issue may be caused by debian-installer. Are you not able to tell debian installer to install to /dev/cciss/c0d0, or is it that the installer incorrectly assumes which disk should contain the MBR without giving the user the option to specify the drive to be used for the MBR. Could you also test if this issue is reproducible when no /dev/sd? devices are present (installing from the CD directly).

As this is not the standard use case for usb startup disks, developers of d-i should respond to this bug stating if supporting installation onto cciss via usb startup disk is a use case they would like to support.

Changed in debian-installer (Ubuntu):
status: New → Incomplete
summary: - installer installs grub into wrong mbr (usb device sda)
+ debian-installer (booted from usb) installs MBR to usb device instead of
+ cciss device
Revision history for this message
JohnCollaros (timefantom) wrote :

Hi,

I have used that USB disk to build other servers (virtual ones) and it works fine.

This problem is only on HP hardware.

The reason why USB install is required, is because there is no optical drive in this unit.

The default process through the installer does not ask where you want to install MBR, it just
asks if you want to install the MBR onto a device its selected.

I have tried breaking out of the process by saying cancel (or back) and then selecting install grub2 from the menu, and then I can select the /dev/cciss device, but the system is not bootable after the reboot.

The method I use renders my USB key un-bootable as an installer, and is required for the first boot of the server,
after which I run grub-install from the console and all is well.

Slightly off-topic: how do i just restore the boot-loader that usb-creator would put on the USB key without launching the whole usb-creator process again?

Revision history for this message
komputes (komputes) wrote :

Hi John,

Concerning your side note, can you see if this restores the ability to boot on the USB key. Please be careful, as in this command I am assuming the USB key is sdb (usually the case when you have one internal HD taking sda).

syslinux /dev/sdb
or
syslinux -f /dev/sdb

Can you let us know if this makes your USB stick bootable and fully functional again?

Revision history for this message
lasers (lasers) wrote :

Hello,

This bug affects me too. The problem is in debian-installer or grub2. It would install MBR on the first device -- regardless. In this case, it determined that the first storage device was my USB device (/dev/sda) instead of my hard drive.

I don't use LiveCD -- I use boot.img.gz under lucid-netboot. My USB is rendered unbootable after it was overwritten. I would have to send the contents to the USB if I want to use it again. If you want any other questions, feel free to ask.

Revision history for this message
afeickert (aaron-feickert-deactivatedaccount-deactivatedaccount) wrote :

I had the same problem. I installed the 10.10 minimal installer to a USB device for an Asus 1005HA netbook. The partitioner installed the root partition to the internal HDD (/dev/sdb) and left the USB device (/dev/sda) alone. However, it installed GRUB onto the USB device, rendering the installer useless.

To fix it, I had to boot to the USB device, which then booted Ubuntu. I was then able to install grub to the HDD, which Ubuntu now recognized as /dev/sda.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for debian-installer (Ubuntu) because there has been no activity for 60 days.]

Changed in debian-installer (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Matt Stevens (matt-elevate) wrote :

Same problem here. Installing to a SATA SSD from a USB flash drive. The installer allows me to choose the SATA drive at sdc and installation proceeds just fine, but when the time for Grub installation arrives there is no choice offered about where to install the MBR. Then MBR is then written to the USB drive at sda - which renders the system unbootable unless the USB drive is plugged in.

This is using the long-term support version of Ubuntu Server 10.04

Changed in debian-installer (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Fortyfive (martinakf) wrote :

Hi,

I got this issue too. I simply set the installation location /dev/sdb instead /dev/sda and it works fine. If installer is asking for the location where the grub have to be installed, say no to the main boot record then you can type the location of your hard drive /dev/sdb.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.