Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to prepare something like recovery partition on the PC hard drive. Such recovery partition should contain only Ubuntu installer, nothing more. It also should be bootable in any way, even without any other bootable operating system - I mean situation when boot loader like GRUB is not available.

It is quite easy to prepare such partition with MS Windows installer: it is just to create NTFS partition, give it a bootable flag, and copy Windows DVD content into it - no voodoo with bootloader required. Is it possible to achieve such setup for Ubuntu as well?

If not, I would also be glad to have such partition bootable from GRUB. I also know that it is easy to boot Ubuntu installer from USB stick, but recovery partition has one big advantage: it cannot be lost.

share|improve this question
    
Wouldn't this require informing the BIOS in some way that such a partition exists? I think it can be done with UEFI, but I am not sure of old-school BIOS. Note that I am talking of the second set of requirements - bootable without GRUB. The first, running an installer of a hard disk partition is certainly possible, but would require a bootloader of some sort, perhaps even Grub. –  muru Aug 3 at 18:23
    
It is possible, but not easy. It would be easier to buy a usb and use that, or a DVD –  Tim Aug 3 at 18:25
    
Thanks for your notes. I edited my post, please take a look. –  Mikołaj Bartnicki Aug 3 at 18:30
    
If it is just not losing it, keep it somewhere safe :) The advantage of USB is it can be used on lots of computers... –  Tim Aug 3 at 18:36
    
I suppose the same can be done by using Syslinux and marking the partition as bootable. I'll experiment and see what comes up. –  muru Aug 3 at 20:40

1 Answer 1

You always need some boot loader to boot.

BIOS boots from MBR, UEFI boots from efi partition.

But you can create backup bootable flash drives with just grub to boot any system anywhere on system or flash drive.

This will boot an ISO from a hard drive or any second drive ISO Booting with Grub 2 from Hard drive - drs305

https://help.ubuntu.com/community/Grub2/ISOBoot

Examples - you may copy & edit for your path & ISO version

https://help.ubuntu.com/community/Grub2/ISOBoot/Examples

http://ubuntuforums.org/showthread.php?t=1549847

I do above for my hard drive and all my flash drives (which my system sees as another hard drive). And each version of grub can boot multiple partitions or drives, with possible minor editing for correct location but not full grub rescue boot commands.

share|improve this answer
1  
How the simple bootable NTFS partition boots then? If you do 'dd if=/dev/zero of=/dev/sda bs=1024 count=1024' then you have 1MB of zeros in the beginning of the hard disk, no bootloader of course since MBR is far smaller than 1MB. Then create a primary partition, set it active (bootable flag) and format as NTFS. There is still no bootloader in the MBR, right? Then copy (cp -r) Windows 7/8 setup to that partition and it is enough to boot and start installer. I did it many times. +1 anyway, your answer is valuable. –  Mikołaj Bartnicki Aug 3 at 21:43
1  
That command must also install a Windows boot loader to the MBR. Windows boot loaders in MBR just check for active partition and jump to PBR or partition boot sector which has more boot code. Grub does not use boot flag, but will chain to the same PBR from its menu to boot Windows in BIOS mode. Other boot loaders also use boot flag like Lilo or sysLinux and may be installed to boot Windows since it is not the copyrighted Microsoft code, and will boot Windows if that is the partition with the boot flag. BIOS only transfers control to MBR. –  oldfred Aug 3 at 23:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.