Pendrivelinux V1 install to a portable USB hard drive

The following tutorial will show you how to install Pendrivelinux V1 Full Blown (non compressed) to an external USB Hard Drive (Rotating Platter, not a USB flash drive or flash memory stick) via Pendrivelinux V1. To do this, we create an ext2 partition on the USB Hard Drive. Next we extract or decompress filesystem.squashfs, add a Grub Boot Menu and reconfigure xserver-xorg.

Notes: This tutorial assumes that you already have a working Pendrivelinux V1 USB flash drive or CD (to be used as our host OS). Please backup your data before proceeding. DOES NOT WORK on PENDRIVELINUX 2008!

Warning: To be safe, it is recommended that you disconnect (remove cables) all internal hard drives before attempting the installation process.

Basic essentials:

  • External USB Hard Drive (5GB+ space)
  • Pendrivelinux already installed on a USB flash drive or CD

How to Install Pendrive Linux V1 to a Hard Drive:

  1. Boot Pendrivelinux V1 using the Boot To Ram option
  2. Remove the flash drive or CD you booted from and insert your portable USB Hard Drive
  3. Open a terminal and type sudo su
  4. Type fdisk -l to list available drives/partitions. Note which device is your external USB Hard-Drive (example: /dev/sdb) Throughout this tutorial, replace x with your USB Hard-Drive letter. For example, if your USB Hard-Drive is sdb, replace x with b.
  5. Type umount /dev/sdx1
  6. Type fdisk /dev/sdx
    • Type p to show the existing partition and d to delete it
    • Type p again to show any remaining partitions (if partitions exist, repeat the previous step)
    • Type n to make a new partition
    • Type p for primary partition
    • Type 1 to make this the first partition
    • Press Enter to use the default 1st cylinder
    • Type +5000M to set the partition size (increase the value to create a larger partition)
    • Type a to make the partition active
    • Type 1 to select partition 1
    • Type w to write the new partition table
  7. Type umount /dev/sdx1 (again to ensure it's umounted)
  8. Type mkfs.ext2 -L PDL /dev/sdx1 to format the partition as ext2
  9. Type mkdir /usbhd && mount /dev/sdx1 /usbhd
  10. Type mount -o loop -t squashfs /live_media/casper/filesystem.squashfs /mnt
  11. Type apt-get install rsync grub
  12. Type rsync -avx --progress /mnt/. /usbhd/.
  13. Type umount /mnt
  14. Type grub-install --root-directory=/usbhd --recheck /dev/sdx1
  15. Type cd /usbhd/boot/grub
  16. Type wget http://pendrivelinux.com/downloads/menu.lst
  17. Type chroot /usbhd
  18. Type dpkg-reconfigure xserver-xorg (and follow the onscreen steps " I recommend using the vesa driver first)
  19. Type exit to exit the chrooted environment
  20. Reboot your computer and configure your BIOS or Boot Menu to boot from your external USB hard drive

If all goes well, you should now be running Pendrivelinux from your external USB hard disk. If you have problems getting X to start, relaunch dpkg-reconfigure xserver-xorg and try different settings.

The only user is root with a password of pendrivelinux you can add users once up and running!

Optional: If you plan to boot Pendrivelinux from multiple PC's, install xdebconfigurator to help autoprobe and autodetect video hardware.

  1. Type apt-get install xdebconfigurator
  2. Type rm /etc/X11/xorg.conf
  3. Type cd /boot/grub/
  4. Type rm menu.lst
  5. Type wget http://pendrivelinux.com/downloads/new/menu.lst
Disclaimer