Custom Service Partition

From Hack Sphere Labs Wiki
Jump to: navigation, search

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

  1. Install main OS or have OS installed
  2. Liveboot into gparted
    1. 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
    2. My drive ended up having 1 NTFS partition (OS), 1 ext2 (debian 3gb), and another ext2 (image repo)
  3. Install debian and manually partition/select the drive to install to
    1. Do not create/use a swap partition unless you need to. Debian is only being used as a way to service the main OS.
    2. Format the 3gb ext2 partition before you install debian and set the mountpoint to /
    3. Install grub to the MBR
  4. Reboot and you should have OS selections for Debian and Windows with Debian as the default.
  5. Boot into the debian install
  6. aptitude install unetbootin
  7. aptitude install lxde (or what you prefer)
    1. 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")
    2. I then ran update-grub and rebooted to test
  8. Once you are in the debian install with a graphical manager you can now run unetbootin as root
  9. Then
  10. 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)
  11. Customize your grub boot menu by moving entries from /boot/grub/grub.cfg to /etc/grub.d/40_Custom and running update-grub
  12. Edit /etc/default/grub to boot the OS you want (GRUB_DEFAULT=?)
  13. Edit GRUB_TIMEOUT=1 (0=infinity)
    1. update-grub

Other Ideas

  • Use dd instead of clonezilla
    • Will not work if more then one OS entry unless you get scripts
  • Password Proect Grub