Custom Service Partition
The goal of this project is to create a custom service partition much like the manufactures do but only utilizing free software.
The project uses:
- Clonezilla
- gparted
- Debian
- unetbootin
- A Main OS Already Installed
The concept basically stands as this:
You either install or have installed your primary OS and you have all this freespace on your hard drive or enough space to backup your entire OS to another partition. Instead of using live cds or usb stick you would like to be able to boot to the clone software by rebooting the system and clone either a backup to your os partition or your os partition to a backup drive/partition.
This means that if a system crashes and it has no network connectivity and you do not have your external with you to restore the image you can boot up the system, boot into Clonezilla, and restore the main OS to default from a data partition on the actual system. This is much like the concepts that OEMS use but it is free and gives you options. It also allows you to make your own image and backup your system at will without any external media.
Basic Steps
- Install main OS or have OS installed
- Liveboot into gparted
- Partition your drive so you can fit a netinstall of debian and a ISO of clonezilla. Because I had the space I selected 3GB after my Windows partition, then 40GB for my os backup
- My drive ended up having 1 NTFS partition (OS), 1 ext2 (debian 3gb), and another ext2 (image repo)
- Install debian and manually partition/select the drive to install to
- Do not create/use a swap partition unless you need to. Debian is only being used as a way to service the main OS.
- Format the 3gb ext2 partition before you install debian and set the mountpoint to /
- Install grub to the MBR
- Reboot and you should have OS selections for Debian and Windows with Debian as the default.
- Boot into the debian install
- aptitude install unetbootin
- aptitude install lxde (or what you prefer)
- At this point because dells ACPI tables are horried I had to disable acpi in the debian install because the lxde login prompt would not boot. I had to manually add acpi=off to the command line at boot in grub and then once I was in edit /etc/default/grub (GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="acpi=off")
- I then ran update-grub and rebooted to test
- Once you are in the debian install with a graphical manager you can now run unetbootin as root
- Then http://www.webupd8.org/2011/02/how-to-boot-iso-with-grub2-easy-way.html
- Should now be able to reboot and see a bunch of entries from unetbootin from the clonezilla iso or distro that you installed (I used ISO clonezilla and worked great)
- Customize your grub boot menu by moving entries from /boot/grub/grub.cfg to /etc/grub.d/40_Custom and running update-grub
- Edit /etc/default/grub to boot the OS you want (GRUB_DEFAULT=?)
- Edit GRUB_TIMEOUT=1 (0=infinity)
- update-grub
Other Ideas
- Use dd instead of clonezilla
- GRUB_HIDDEN_TIMEOUT=0
- Will not work if more then one OS entry unless you get scripts
- Password Proect Grub
Resources
- http://ubuntuforums.org/showthread.php?t=1195275
- https://help.ubuntu.com/community/Grub2
- http://ubuntuforums.org/showthread.php?t=1369019
- http://haiku-os.org/development
8http://unetbootin.sourceforge.net/