tux on a stick

No Comments

I have a 4gb TDK usb drive and i want to try running a full-blown linux on it. I am using this guide from pendrivelinux to install xubuntu on the flash drive.

The instruction is for creating two partitions: the first one is a fat16 partition that will hold the main system while the second partition is a small ext2 partition for the persistent data (settings?). I modified it a bit with this setup:

  • sdb1 – 3GB FAT32 – for sharing data
  • sdb2 – 1GB – fat16 for the main system. I tried using ext2 but the instruction was really for a fat16 partition for the syslinux step
  • sdb3 – 115MB – persistent partition that is labeled casper-rw

The partitions were created using cfdisk on my archlinux system. I opted to put the 3GB partition at the start because I am from the old school thinking that when dealing with stupid OSes always put the partitions it can read first. All of the partitions are physical partitions but i marked the second one as the active/bootable partition.

Everything else in the tutorial went smoothly except when it was time to boot the machine using the usb drive. The booting stopped with the message that the boot sector was invalid or damaged. I tried googling around for the fix which basically suggests installing the boot loader on the flash drive’s boot sector (/dev/sdb) but these did not work.

I finally gave in and restarted the installation process, only this time I placed the 3GB partition at the end so that I will be mostly compliant with the pendrive linux guide. There is really something to be said for following instructions especially if those instructions do not contain any discussion on the rationale. My tux in a stick works although it takes quite a while to boot my laptop. I have been able to use it in the office so I can copy a big file (RTC linux client) that I need to bring home from the office since I cannot complete the download at home.

I am happy since I have a portable Linux system in case I need it. As for the question on whether Windows was able to recognize the data space at the end of the drive, I honestly don’t know. I haven’t booted into Windows yet here at home, and the USB ports are locked by the domain server at work. I guess I will eventually know the answer but I am not in a hurry to find out. 🙂


Fixing the swap partition

1 Comment

After a few failed attempts in getting my ArchLinux desktop system go into hibernation, my boot-up shows an error during the mounting of the swap file. Issuing the “free” command validates that I don’t have any swap space running. My desktop system has 2GB of physical RAM but I wouldn’t want to wait for something to fail before fixing the swap space.

The fix is to format the swap partition (/dev/sda8) again before activating it using this command sequence:

# mkswap /dev/sda8
# swapon -a

mount -a would also work in place of the swapon command.

NOTE: mkswap will happily format the device or file you pass on as parameter so make sure you are passing the correct partition or you will be sorry. 🙂