Changes between Version 3 and Version 4 of Linux/Ubuntu/HardyRAID5EncryptedLVM


Ignore:
Timestamp:
07/07/08 18:31:05 (9 years ago)
Author:
tj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Linux/Ubuntu/HardyRAID5EncryptedLVM

    v3 v4  
    512512Insert the stick into a USB port and let the system start. 
    513513 
     514If using usplash you should see a message similar to "Success loading key-file from sde (casper-rw)" early in the boot process when `crypto-usb-key.sh` locates the key-file. If it fails you'll see "FAILED to find suitable USB key-file ..." followed by "Try to enter the LUKS password:". At this point, if the device has a pass-phrase as well as a key-file you can type it instead of using the key-file. 
     515 
     516=== Debugging crypt-usb-key.sh === 
     517 
     518If that fails you'll need to enable debugging within the script by changing: 
     519{{{ 
     520DEBUG=$FALSE 
     521}}} 
     522to 
     523{{{ 
     524DEBUG=$TRUE 
     525}}} 
     526 
     527To do this the initial RAM disk image needs updating. That means the encrypted volume must be opened and mounted and the chroot environment recreated from the Live CD. Because that involves a lot of steps I put all the commands into a script. The script is attached to this article [http://tjworld.net/attachment/wiki/Linux/UbuntuHardyRAID5EncryptedLVM/update-liveCD-RAIDencryptedLVM.sh update-liveCD-RAIDencryptedLVM.sh]. It will install the packages, configure and unlock the devices, recreate the chroot environment, download and install the latest version of `crypto-usb-key.sh` attached to this article, then update the initial RAM disk image. 
     528 
     529Restart the system using the Live CD and open a terminal, then: 
     530{{{ 
     531sudo su 
     532wget http://tjworld.net/raw-attachment/wiki/Linux/UbuntuHardyRAID5EncryptedLVM/update-liveCD-RAIDencryptedLVM.sh 
     533chmod a+x update-liveCD-RAIDencryptedLVM.sh 
     534}}} 
     535The script requires the key-file name be assigned to the environmental variable KEYFILE: 
     536{{{ 
     537KEYFILE="/home/tj/Media/theme-song.mp3" 
     538./update-liveCD-RAIDencryptedLVM.sh 
     539}}} 
     540Now make the changes and update the initial RAM disk image: 
     541{{{ 
     542sed -i 's/^\(DEBUG=\)$FALSE/\1$TRUE/' /mnt/target/usr/local/sbin/update-usb-key.sh 
     543update-initramfs -u all 
     544}}} 
     545 
     546You might also want to remove the "splash" option from the kernel command-line in the GRUB configuration (either in the file /boot/grub/menu.lst or by pressing Escape when GRUB is starting after a reboot to edit the menu directly). This will ensure that the large number of debug messages from the script are easily readable on the console, rather than scrolling up too fast in usplash. 
     547 
     548Now the system can be restarted and hopefully the messages will help identify the cause of the problem, and suggest a solution. 
     549 
     550Once the problem is fixed don't forget to change the debug setting back to $FALSE and update the initial RAM disk image. 
     551 
    514552== References == 
    515553