Linux / OpenSource

Friday, October 10, 2014

LinuxMint 17 installation RAID root device

To summarize you can't install LinuxMint 17, to a hard disk where / and /boot are on RAID devices, using the live disk. I believe the problem is also there in Ubuntu which is where it has inherited the issue.

This would manifest itself when the installer will complain about grub not able to install the bootloader and then the installer would crash if you bypassed grub installation.

You would imagine you can solve this by letting the installer quit and then chroot into the new installation and then running grub-install manually but you would be out of luck. While trying out manually you would see errors with grub-probe not recognizing md devices and expecting only physical disks like [hfc]d[0..9].

So what is wrong with the picture ?
Two things actually - at least for LinuxMint 17.
  1. Default installer/live disk doesn't come with mdadm installed - easily fixed by running apt-get.
  2. grub isn't the latest or greatest

Solution
  1. Make sure mdadm is installed and raid devices are assembled before starting the installer. No you don't have to recreate your RAID device and neither do you have to format your partitions unless it is the root device. Somehow sudo mdadm created different raid device  numbers instead of sudo bash and then mdadm - this shouldn't change the installation in anyway.
  2. Continue till the end - including skipping grub installation and then letting the installer crash.
  3. Write down your nameserver from /etc/resolv.conf if you don't know it already
  4. Open a terminal and switch to root - or sudo every command I don't care :)
  5. Switch to your installation media mount point and mount the following folders
    mount -t proc proc proc/
    mount -t sysfs sys sys/
    mount -o bind /dev dev/
  6. chroot <your installation media mount point>
  7. Add your DNS server to /etc/resolv.conf
  8. apt-get install mdadm grub2
  9. Sit back and enjoy while it fixes everything for you :)

[RANT]
This is a modern OS with known technologies working internally - why I am chrooting and apt-getting to do basic installation on a RAID device ? This problem doesn't exist on Fedora 20 - I shouldn't be aware of anything different to be done.

Friday, September 11, 2009

FC11 + Nvidia Driver = no X

After the latest update on September 10 X has stopped working.

FC11 - updated Sep 10, 2009 9pm
NVidia Driver - release 185.18.36

Seems it is FC11 after all. Basically I was following my own instructions from the days of FC9 and had the following in my xorg.conf

Option "AutoAddDevices" "off"

This is basically causing X to segfault along with my hal setup. Commenting out the above line made my setup with NVidia driver to start working again. I am soooo happy now :)

Monday, August 17, 2009

FC11 update broke support for lirc

This applies to kernel 2.6.29.6-217.2.7.fc11 for both 64 and 32 bit releases.

Basically the release lost the lirc driver due to a build error. The symptoms would be that your IR receiver would be recognized as a USB device but the lirc daemon wont be able to talk to it. /var/log/messages would show error message saying /dev/lirc missing.

You can track updates to it in the following bug request.

https://bugzilla.redhat.com/show_bug.cgi?id=517765

Note: This was fixed in the next kernel update

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 !!