Page 1 of 1
SOLVED - Debian on USB & BOOTMGR error
Posted: 25. Jul 2012, 01:14
by Lucien_Midnight
Hi,
I have Debian installed on a USB Flash drive, it was created in VirtualBox and boots fine on a Windows 7 computer as a USB device. The USB has 3 partitions, FAT32, Debian (booting from GRUB) and Swap.
I have set up the virtual drive so the USB can be recognised (eventually!), but now I receive BOOTMGR / CTRL+ALT+DEL error.
(actually it says: "Hianyzo BOOTMGR" "Ojrainditas: Ctrl+Alt+Del" which I assume means it can't find the BOOTMGR)
Any idea how I can fix this in VirtualBox? Is the error due to using windows MBR, if so how can I change it?
Thanks in advance
Re: Debian on USB & BOOTMGR error
Posted: 25. Jul 2012, 01:40
by Perryg
And the reason for the FAT32 partition is?
I wouldn't say you are missing a windows MBR unless you installed Windows on the device first. I would say you are missing the Linux boot loader.
The process to fix this is rather intense but you can see how by using google and search for install debian Linux boot loader
Re: Debian on USB & BOOTMGR error
Posted: 25. Jul 2012, 22:19
by Lucien_Midnight
Thanks, I will have a look.
Fat32 is so that I can save files that will be recognised by windows, it's strange about the bootloader because it is recognised if I boot directly from the device.. it's only VirtualBox that I get his error.
Re: Debian on USB & BOOTMGR error
Posted: 25. Jul 2012, 22:25
by Perryg
Ah I see what might be going on. USB devices are not actually bootable in VirtualBox. You would need to create a RAW access connection to it for it to be able to boot. Expert usage only. (see warnings in the link below) Good luck.
http://www.virtualbox.org/manual/ch09.html#idp15871152
Re: Debian on USB & BOOTMGR error
Posted: 27. Jul 2012, 00:22
by Lucien_Midnight
I did do that, my (unconfirmed) theory was that maybe booting through VirtualBox the bootmgr was pointing to a different location - although I have no idea why this would be the case anyway. I figured that if there was a problem it would be better to have grub on hd0...
Wrong!
I tried to install grub to C as shown in another tutorial (and succeeded) but now it will not boot on computer startup because the kernel does not exist on sdx1. I have tried to rescue and reinstall grub back to /dev/sdx2 (debian) through VirtualBox but get exit error 1.
Any quick tips on editing grub2 so it points back to the kernel located on /dev/sdx2? I have no problem reinstalling, I haven't done anything else yet, but would rather learn how to fix it as I'm sure to create more problems playing around later that I would like to be able to fix.

I'm using a 16G microsd usb. The drive is set up so that sdx1 is FAT32 and would contain "My Documents" files so they can be accessible from any OS, I have also discovered I can run VirtualBox Portable from here, sdx2 is ext3 with debian "squeeze" and sdx3 is swap until I create a swap file.
Any alternative suggestions welcome - other than pick another project.
Now I have booted debian rescue (using VB), reset the partitions (it did not identify sdx2 as /) and reinstalled grub to sdx2. Debian (cloned in VB) now boots to grub rescue but does not have access to any shells so I'm guessing it's still running from sdx1. Rebooting directly from the USB meets with the same results. Suggestions on a postcard please.
Re: Debian on USB & BOOTMGR error
Posted: 28. Jul 2012, 22:47
by Lucien_Midnight
I've given up and am reinstalling everything.
Thanks for the help, it should come in handy with the fresh install.
Re: SOLVED - Debian on USB & BOOTMGR error
Posted: 30. Jul 2012, 12:39
by Lucien_Midnight
I have done a fresh install and eventually discovered what the problem had been.
I had the USB attached in the VB settings. VB couldn't boot because of this, when this was removed (because I was running VB portable from the USB I have debian installed on) everything worked fine. The USB boots on computer start, from VB on the computer, and from VB Portable on the USB.
Method: open cmd and VB as admin (on windows, right click and "run as"), follow a tutorial to create .vmdf
I created two vmdf for disk 1 and disk 2 depending on what computer I am on and what drive the USB gets filed as. Both of these have been attached in the storage settings as Primary Master and Primary Slave - if you have other bootable OS I wouldn't recommend this unless you edit GRUB to account for it.
Let the vmdf file find the usb, do not attach.
I have sda1 - FAT32, sda2 - debian standard install with GRUB on hd0 (installed using VB), and sda3 -swap.
Next project: To fix SSD settings and create swapfile.
Then: To create Ubuntu Perpertual on the USB.