troubleshooting – Grey Panthers Savannah https://grey-panther.net Just another WordPress site Tue, 12 Apr 2011 15:59:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 206299117 Booting the Linux Kernel from Grub2 https://grey-panther.net/2011/04/booting-the-linux-kernel-from-grub2.html https://grey-panther.net/2011/04/booting-the-linux-kernel-from-grub2.html#respond Tue, 12 Apr 2011 15:59:00 +0000 https://grey-panther.net/?p=65 Recently a good friend of mine managed to uninstall all the kernels from his Ubuntu machine (what can I say – Monday morning and no coffee is a deadly combination). Luckily he had the install CD on hand so we did the following:

  1. Boot from the CD (we had Internet connection)
  2. Mount the Linux partition and chroot into it
  3. sudo su
    cd /media/..
    chroot .
    
  4. Reinstall the kernel with aptitude
  5. Reboot and go into Grub2 command mode
  6. Now do the following (commands need to be adjusted to match your partition – also, tab completion works, so you don’t have to guess)
    insmod part_msdos
    insmod ext2
    set root=(hd0,3)
    linux /boot/vmlinuz-2.6.32.38-generic root=/dev/sda3 ro
    initrd /boot/initrd.img-2.6.38-6-686
    boot

It seems that most of the examples on the ‘net are for Grub 1 and little is out there for Grub 2. I found the following three: How to use Grub2 to boot Linux manually, The Grub 2 Guide, GRUB 2 bootloader – Full tutorial. Also, I didn’t perform steps 4-5 because he just reinstalled Ubuntu (it was a fresh install anyway), but I tried it out separately on my laptop and it works.

HTH

]]>
https://grey-panther.net/2011/04/booting-the-linux-kernel-from-grub2.html/feed 0 65
Recovering encrypted home directory under Ubuntu https://grey-panther.net/2011/04/recovering-encrypted-home-directory-under-ubuntu.html https://grey-panther.net/2011/04/recovering-encrypted-home-directory-under-ubuntu.html#comments Sun, 10 Apr 2011 19:24:00 +0000 https://grey-panther.net/?p=67 While the home-folder encryption in Ubuntu is far from a perfect solution (there is considerable data leakage from the swap file and the temp directory – for example once I’ve observed the flash videos from Chromium porn private browsing mode being present in the /tmp directory), it is a partial solution nevertheless and very easy to set up during installation. However what can you do if you need to recover the data because you fubard your system?

Credit where credit is due: this guide is taken mostly from the Ubuntu wiki page. Also, this is not an easy “one-click” process. You should proceed carefully, especially if you don’t have much experience with the command line.

  1. Start Ubuntu (from a separate install, from the LiveCD, etc) and mount the source filesystem (this is usually as simple as going to the Places menu and selecting the partition)
  2. Start a terminal (Alt+F2 -> gnome-terminal) and navigate to the partitions home directory. Usually this will look like the following:
    cd /media/9e6325c9-1140-44b7-9d8e-614599b27e05/home/
  3. Now navigate to the users ecryptfs directory (things to note: it is ecryptfs not encryptfs and your username does not coincide with your full name – the one you click on when you log in)
    cd .ecryptfs/username
  4. The next step is to recovery your “mount password” which is different from the password you use to log in (when it asks you, type in the login password used for this account – for which you are trying to recover the data). Take note of the returned password (you can copy it by selecting it and pressing Shift+Ctrl+C if you are using the Gnome Terminal)
    ecryptfs-unwrap-passphrase .ecryptfs/wrapped-passphrase
  5. Now create a directory where you would like to mount the decrypted home directory:
    sudo mkdir /media/decrypted
  6. Execute the following and type in (or better – copy-paste) the mount password you’ve recovered earlier
    sudo ecryptfs-add-passphrase --fnek

    It will return something like the following. Take note of the second key (auth tok):

    Inserted auth tok with sig [9986ad986f986af7] into the user session keyring 
    Inserted auth tok with sig [76a9f69af69a86fa] into the user session keyring
  7. Now you are ready to mount the directry:
    
    sudo mount -t ecryptfs /media/9e6325c9-1140-44b7-9d8e-614599b27e05/home/.ecryptfs/username/.Private /media/decrypted
     Passphrase:  # mount passphrase
     Selection: aes
     Selection: 16
     Enable plaintext passthrough: n 
     Enable filename encryption: y # this is not the default!
     Filename Encryption Key (FNEK) Signature: # the second key (auth tok) noted
    

    You will probably get a warning about this key not being seen before (you can type yes) and asking if it should be added to your key cache (you should type no, since you won’t be using it again probably).

That’s it, now (assuming everything went right) you can access your decrypted folder in /media/decrypted. The biggest gotcha is that home/username/.Private is in fact a symlink, which – if you have an other partition mounted – will point you to the wrong directory, so you should use the home/.ecryptfs/username directory directly.

HTH

]]>
https://grey-panther.net/2011/04/recovering-encrypted-home-directory-under-ubuntu.html/feed 1 67
Fixing a dead Asus WL-500g https://grey-panther.net/2010/03/fixing-a-dead-asus-wl-500g.html https://grey-panther.net/2010/03/fixing-a-dead-asus-wl-500g.html#comments Wed, 17 Mar 2010 08:16:00 +0000 https://grey-panther.net/?p=120 A short story with a happy ending: my Asus WL-500g locked up and it wasn’t starting, even after I hard-reset it (removed the power and plugged it back in). All the LEDs were constantly on (normally, when you plug in the power, they should light up for a second or so and the turn off). After some searching I found a page on FixYa which pointed me to the following forum thread: Dead or brick ? Lan and WAN 1-4 leds on steady. There were a couple of stories here with identical symptoms, so I decided to give the solution a try.

The tricky part was to find a source which could deliver 2.5A at 5V (most of the ones I found peaked at 1.5A). Finally I found this one locally and it worked like a charm! (It seems the trick is to search for “switch power source”). Also, for extra safety, look carefully at the adapter when you get it to make sure that it conforms to the specification (5V DC / 2.5A) and if possible, use a multimeter to ensure that the polarization is correct (in my case it was + on the inside, – on the outside).

PS. I didn’t get to disassemble my old source yet, but I will post photos whenever I do so.

]]>
https://grey-panther.net/2010/03/fixing-a-dead-asus-wl-500g.html/feed 3 120