Menu

NTFS as boot drive filesystem

2012-05-14
2013-04-05
  • Jonathan Shay

    Jonathan Shay - 2012-05-14

    Is it possible to use NTFS as a boot-drive filesystem for Clonezilla Live on an external USB hard drive?  I've had issues formatting larger drives with a FAT32 filesystem (I've used the FastFAT32Formatter utility with mixed results), and would love to be able to use the NTFS filesystem.  I've obtained an updated version of SYSLINUX.EXE that works with NTFS partitions, and have successfully created my pre-seed job options (shown below) that allow me to create a one-button backup menu entry IF I use a FAT32 partition.  Is it possible to change these pre-seed options to accomodate an NTFS filesystem?

    I'm dealing solely with a single-hard drive workstation (/dev/sda) that will allow me to boot Clonezilla from a removable second hard drive (USB) (/dev/sdb) as well as store my Clonezilla images on the same /dev/sdb.

    My existing FAT32 working backup preseed commands are:

    append initrd=/live/initrd.img boot=live union=aufs config  noswap nolocales edd=on noprompt nomodeset ocs_prerun="mount -o remount,rw /live/image" ocs_prerun2="sudo rm -r /home/partimag" ocs_prerun3="cd /home" ocs_prerun4="sudo ln -s /live/image/home/partimag partimag" ocs_live_run="ocs-sr -q2 -c -j2 -z1p -i 2000 -p true savedisk ask_user sda" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 ip=frommedia

    I've tried (with extremely limited Linux knowledge/experience) a menu entry with:

    append initrd=/live/initrd.img boot=live union=aufs config  noswap nolocales edd=on noprompt nomodeset ocs_prerun="sudo mount -t ntfs-3g /dev/hdb1 /live/image" ocs_prerun2="sudo rm -r /home/partimag" ocs_prerun3="cd /home" ocs_prerun4="sudo ln -s /live/image/home/partimag partimag" ocs_live_run="ocs-sr -q2 -c -j2 -z1p -i 2000 -p true savedisk ask_user sda" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 ip=frommedia

    but this fails as any shares available on /dev/sdb have been mounted as read-only and the ntfs-3g driver does not seem to currently support remounting in a read/write mode.

    Is booting CloneZilla live from an NTFS external drive possible?

    Please advise.

     
  • Jonathan Shay

    Jonathan Shay - 2012-05-16

    I resolved this by loading CloneZilla into RAM, then using my pre-seed options to mount my USB hard drive.

    My updated syslinux.cfg menu option is as follows:

    append initrd=/live/initrd.img boot=live config noswap nolocales edd=on nomodeset noprompt ocs_prerun="sudo rm -r /home/partimag" ocs_prerun1="sudo ntfs-3g /dev/sdb1 /live/image" ocs_prerun2="cd /home" ocs_prerun3="sudo ln -s /live/image/home/partimag partimag" ocs_live_run="ocs-sr -q2 -c -j2 -z1p -i 2000 -p true savedisk ask_user sda" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 toram=filesystem.squashfs ip=frommedia  nosplash

    This allows my user to select a single menu entry "Backup workstation" that will prompt the user for a backup-set name and have the backup automatically placed on the attached USB hard drive.

     
  • Steven Shiau

    Steven Shiau - 2012-05-20

    Cool! Thanks for sharing that.
    Actually syslinux does not support NTFS, so that's the problem. However, with grub2, you can. So if you want to do that, switching to use grub2 as the boot loader on USB flash drive is another solution.

    Steven.

     
  • Jonathan Shay

    Jonathan Shay - 2012-08-17

    Steven-

    The version of syslinux I'm using does in fact support NTFS filesystems, but it's definitely in beta.  It seems to me that my drive becomes unbootable after each time I write data to it, and I need to re-run the SYSLINUX installation routine to re-enable bootability.

    How involved would the switch from syslinux to grub2 be?  Is it a drop-in replacement, or are the changes more involved than that?

     
  • ndog37

    ndog37 - 2012-08-21

    johnathanshay,

    Firstly if you use grub2 and debian based clonezilla you will have problems with vga mode as listed here Therefore I recommend you use a ubuntu based clonezilla with grub2 if you need high screen resolution.

    Install grub2 to your drive. It will write to the MBR and create a folder which contains grub.cfg. Text edit grub.cfg and add entries like I have here.

    Note this is my personal laptop which has grub2 installed and I use to multiboot. I use clonezilla to backup/restore windows XP which lives on sda1. The clonezilla images are stored into sda2/backup/clonezilla. You will need to modify parts to suit your needs but this will give you the basic premise as well as list differences between debian and ubuntu based versions.

    sda1 - NTFS - winxp first 5GB
    sda2 - NTFS - shared data partition

    sda2 folder structure
    /vboot/clonezilla/debian - contains vmlinuz, initrd.img, filesystem.squashfs
    /vboot/clonezilla/precise - contains vmlinuz, initrd.img, filesystem.squashfs
    /backup/clonezilla - images stored in here

    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s /vboot/grub/grubenv ]; then
      have_grubenv=true
      load_env
    fi
    set default="${saved_entry}"
    if [ ${prev_saved_entry} ]; then
      saved_entry=${prev_saved_entry}
      save_env saved_entry
      prev_saved_entry=
      save_env prev_saved_entry
    fi
    if loadfont /vboot/fonts/unicode.pf2 ; then
      set gfxmode=1024x768
      insmod gfxterm
      insmod vbe
      if terminal_output gfxterm ; then true ; else
        # For backward compatibility with versions of terminal.mod that don't
        # understand terminal_output
        terminal gfxterm
      fi
    fi
    insmod jpeg
    background_image /vboot/grub/vmlite-logo.jpg
    if [ ${recordfail} = 1 ]; then
      set timeout=-1
    else
      set timeout=10
    fi
    ### END /etc/grub.d/00_header ###
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=red/white
    ### END /etc/grub.d/05_debian_theme ###
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "/dev/sda1 - Windows XP Professional SP3 x86" {
      parttool (hd0,1) hidden-
      parttool (hd0,2) hidden-
      root (hd0,1)
      chainloader +1
      boot
    }
    menuentry "VHD - Windows 7 Professional SP1 x64" {
      parttool (hd0,1) hidden+
      parttool (hd0,2) hidden-
      vboot harddisk=(hd0,2)/vhd/win7_x64.vhd
      snapshotentry "UseMe" {
        vboot  harddisk="(hd0,2)/vhd/win7_x64-s1.vhd"
      }
    }
    menuentry "VHD - Ubuntu 11.04 beta 1, Linux 2.6.38-7-generic" {
      parttool (hd0,1) hidden+
      parttool (hd0,2) hidden-
      vhd vhd0 (hd0,2)/vhd/ubuntu-1104/ubuntu-1104-beta1-i386.vhd --partitions
      linux (hd0,2)/vhd/ubuntu-1104/vmlinuz-2.6.38-7-generic root=/dev/sda2 vloop=/vhd/ubuntu-1104/ubuntu-1104-beta1-i386.vhd vlooppart=p1 quiet splash
      initrd (hd0,2)/vhd/ubuntu-1104/initrd.img-2.6.38-7-generic
    }
    menuentry "Prepare disk for install sda1" {
      parttool (hd0,1) hidden-
      parttool (hd0,2) hidden+
      root (hd0,1)
    }
    menuentry "Prepare disk for install new VHD" {
      parttool (hd0,1) hidden+
      parttool (hd0,2) hidden-
      root (hd0,2)
      chainloader +1
    }
    menuentry "Clonezilla Precise Manual" {
      parttool (hd0,1) hidden-
      parttool (hd0,2) hidden-
      root (hd0,2)
      linux /vboot/clonezilla/precise/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" keyboard-layouts=\"\" ocs_live_batch=\"no\" locales=\"\" video=uvesafb:mode_option=1024x768-32 ip=frommedia nosplash live-media-path=/vboot/clonezilla/precise bootfrom=/dev/sda2 toram=filesystem.squashfs
      initrd /vboot/clonezilla/precise/initrd.img
    }
    menuentry "  Clonezilla Precise Restore Image WinXP sda1" {
      parttool (hd0,1) hidden-
      parttool (hd0,2) hidden-
      root (hd0,2)
      linux /vboot/clonezilla/precise/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" keyboard-layouts=\"NONE\" ocs_live_batch=\"yes\" locales=\"en_US.UTF-8\" video=uvesafb:mode_option=1024x768-32 ip=frommedia nosplash live-media-path=/vboot/clonezilla/precise bootfrom=/dev/sda2 toram=filesystem.squashfs  ocs_prerun1=\"mount /dev/sda2 /mnt\" ocs_prerun2=\"mount --bind /mnt/backup/clonezilla /home/partimag/\" ocs_live_run=\"/usr/sbin/ocs-sr --batch -g auto -e1 auto -e2 -j2 -k -p reboot restoreparts ask_user sda1\"
      initrd /vboot/clonezilla/precise/initrd.img
    }
    menuentry "  Clonezilla Precise Create Image WinXP sda1" {
      parttool (hd0,1) hidden-
      parttool (hd0,2) hidden-
      root (hd0,2)
      linux /vboot/clonezilla/precise/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" keyboard-layouts=\"NONE\" ocs_live_batch=\"yes\" locales=\"en_US.UTF-8\" video=uvesafb:mode_option=1024x768-32 ip=frommedia nosplash live-media-path=/vboot/clonezilla/precise bootfrom=/dev/sda2 toram=filesystem.squashfs  ocs_prerun1=\"mount /dev/sda2 /mnt\" ocs_prerun2=\"mount --bind /mnt/backup/clonezilla /home/partimag/\" ocs_live_run=\"/usr/sbin/ocs-sr -q2 --batch -j2 -z1 -i 2000 -sc -rm-win-swap-hib -p reboot saveparts ask_user sda1\"
      initrd /vboot/clonezilla/precise/initrd.img
    }
    menuentry "Clonezilla Debian Manual" {
      parttool (hd0,1) hidden-
      parttool (hd0,2) hidden-
      root (hd0,2)
      linux /vboot/clonezilla/debian/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" keyboard-layouts=\"\" ocs_live_batch=\"no\" locales=\"\" ip=frommedia nosplash live-media-path=/vboot/clonezilla/debian bootfrom=/dev/sda2 toram=filesystem.squashfs
      initrd /vboot/clonezilla/debian/initrd.img
    }
    menuentry "  Clonezilla Debian Manual Restore Image WinXP sda1" {
      parttool (hd0,1) hidden-
      parttool (hd0,2) hidden-
      root (hd0,2)
      linux /vboot/clonezilla/debian/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" keyboard-layouts=\"NONE\" ocs_live_batch=\"yes\" locales=\"en_US.UTF-8\" ip=frommedia nosplash live-media-path=/vboot/clonezilla/debian bootfrom=/dev/sda2 toram=filesystem.squashfs  ocs_prerun1=\"mount /dev/sda2 /mnt\" ocs_prerun2=\"mount --bind /mnt/backup/clonezilla /home/partimag/\" ocs_live_run=\"ocs-sr -b -g auto -e1 auto -e2 -j2 -k -p reboot restoreparts ask_user sda1\"
      initrd /vboot/clonezilla/debian/initrd.img
    }
    menuentry "  Clonezilla Debian Manual Create Image WinXP sda1" {
      parttool (hd0,1) hidden-
      parttool (hd0,2) hidden-
      root (hd0,2)
      linux /vboot/clonezilla/debian/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" keyboard-layouts=\"NONE\" ocs_live_batch=\"yes\" locales=\"en_US.UTF-8\" ip=frommedia nosplash live-media-path=/vboot/clonezilla/debian bootfrom=/dev/sda2 toram=filesystem.squashfs  ocs_prerun1=\"mount /dev/sda2 /mnt\" ocs_prerun2=\"mount --bind /mnt/backup/clonezilla /home/partimag/\" ocs_live_run=\"ocs-sr -q2 -b -j2 -z1 -i 2000 -sc -rm-win-swap-hib -p reboot saveparts ask_user sda1\"
      initrd /vboot/clonezilla/debian/initrd.img
    }
    ### END /etc/grub.d/30_os-prober ###
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    

    As always please let us know how you get on and share with the community what works for you!

     
  • Steven Shiau

    Steven Shiau - 2012-08-23

    @johnathanshay,
    Yes, grub2 is a better choice.

    @nottaken37,
    Thanks for sharing that.

    Steven.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.