Thursday, December 4, 2008

Fedora 10 LiveCD on USB Disk

The following steps will setup a flash disk for usage as a live media without using any third party applications. I have tested this with Fedora 10 - it should work for almost any distribution which has a live-cd version. The pre-requisites are as follows:
1.Have sufficient disk space on the destination media - Fedora 10 required approximately 770MB after installation.
2. A linux distribution with a functional copy of grub - Fedora boots using grub.
  1. Grab the live cd ISO from http://fedoraproject.org/en/get-fedora
  2. Create a mount point mkdir temp
  3. Mount the iso on this folder mount -o loop F10-i686-Live.iso temp
  4. Format your flash disk in your favorite filesystem - I chose EXT2 since it is a non journaled and widely supported FS. That should prevent you from using maybe ReiserFS mke2fs -I 128 /dev/sdb1 Note: I decided to have a partition table and I have only one disk in my desktop. You have to figure out whether /dev/sdb1 is truly the partition to hold your live media. Note 2: I chose to downgrade the inode size from the fedora default of 256 to the more common 128
  5. Mount the new filesystem somewhere mount /dev/sdb1 /media/b1
  6. Copy the complete ISO filesystem to your flash drive cd temp && cp -rv . /media/b1
  7. Copy the grub binaries cp -rv /boot/grub /media/b1/
  8. Install grub on the flash MBR by running the following commands in grub
    • map (hd0) (hd1) # This swaps your first disk with the second for grub
    • map (hd1) (hd0) # This swaps your second disk with the first for grub
    • root (hd1,0) # Your boot partition is the first partition of your second disk
    • setup (hd1) # Install grub in the MBR of your second disk
  9. Hit Control-D to come out of grub
  10. The ISO has a grub.conf but it wont exactly work out of the box - copy it to get a default template and to be similar to what it would have looked like if you booted off the CD. cp temp/EFI/boot/grub.conf /media/b1/boot/grub/grub.conf
  11. Edit the grub.conf and make the following changes
    • Delete rootfstype=iso9660
    • Replace root=CDLABEL=F10-i686-Live with root=/dev/sdb1 (If your number of hard disks are more than one or you keep plugging in and out media disk set a label to the fielsystem on the USB disk and use that label after root=CDLABEL=[your new label])
  12. Save and quit the grub.conf file
To elaborate the following things happened in the grub installation
  1. We installed grub in the MBR of the second disk and told it which partition to look for the boot loader
  2. We asked grub to assume that it is booting off the first disk (using the map command) - this is necessary because when the BIOS hands it over to grub the USB disk is the first hard disk
  3. Next once the kernel is loaded in memory the USB disk is the second disk it sees since the hard disk in the desktop/laptop is the first one it recognizes. Hence we set root=/dev/sdb1

Note: LiveCD implies a version of your distribution which doesn't require installation on your local hard disk. Technically any distribution released as a squashfs should work.

Friday, October 10, 2008

Fix broken Touchpad Fedora 9

  1. Login as root
  2. Save this file as /etc/hal/fdi/policy/10-synaptics.fdi
  3. Save x11-input.fdi in /etc/hal/fdi/policy/
  4. Test your installation, run hal-device to obtain a list of all devices and look for the input.x11* keys.
  5. Restart haldaemon
  6. Update your xorg.conf to have the following
Section "ServerLayout"
Option "AutoAddDevices" "off"
EndSection


Restart your X Windows once the above changes have been applied.

Even though the above steps are suggested as a workaround I feel it is a more elegant way of doing things and wont find a reason to deviate from the setup even if a solution is provided.

Thursday, July 3, 2008

Fedora 9 wishlist

  1. SmartTools doesnt configure all disks - yet I have to manually configure the .conf file
  2. lm_sensors found only the cpu sensor - what gives ?? I see CPU, GPU, Memory, Chipset and Hard disk using the I8kfanGui tool by Christian Diefer
By the way incase you haven't used it - I recommend installing the I8kfanGui tool from http://www.diefer.de/i8kfan/index.html and SpeedSwitch tool from http://www.diefer.de/speedswitchxp/index.html while you are on Windows XP. Ofcourse on Linux cpu_throtling does a pretty good job :)

Fedora 9 Issues

Ok finally got around to installing Fedora 9 and there seems to be more than the usual share of issues !!

  1. Synaptic touchpad don't work out of the box installation - [UPDATE] check my later postings on this topic.
  2. wpa_supplicant is still kicking in way after networking has started - I don't know why RedHat/Fedora still thinks WiFi is a optional add on network device.
  3. Grub gets confused with which XP partition is primary - my second partition is flagged as bootable yet it configured grub.conf with hd(0,2)
  4. mke2fs defaults to inode size of 256 - this is not backward compatible and more specifically it won't work with EXT2 IFS windows ext2 driver.
If your life depends on tapping on your touch pad - be ready to change configurations. This is an outstanding open issue https://bugzilla.redhat.com/show_bug.cgi?id=439386

wpa_supplicant is still an issue as my post from Fedora 7 mentions. Do note it doesnt prevent networking from establishing or WiFi being unavailable. It is just irritating and it is definitely not the "right thing" to do. If wpa_supplicant starts after networking your wlan0 device will start and not finding the right device available will go to sleep and wait for it to return which happens whenever wpa_supplicant starts successfully.

The third point needs elaboration since my partition layout is a bit unusual. I have three entries - one linux and two NTFS - the second entry points to the third physical partition and the third entry is pointing to the second physical partition. Although common sense says trust the partition table and not the layout !!