LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-16-2010, 06:42 AM   #1
jelezarov
LQ Newbie
 
Registered: Nov 2007
Location: /dev/urandom
Distribution: Slackware
Posts: 25

Rep: Reputation: 17
bootable usb drive for fully encrypted slackware?


Hi,

following the alien bob's guide from "README_CRYPT.TXT" on the disk i sucesfully create and work with fully encrypted volumes.

So, i wonder - is there any way to get the entire /boot directory on flash stick and boot only with it. How can i add the initrd and all the stuff and force /root to be on the hard disk. I searched Google and the only similar solution i found was for grub.

Any suggestions welcomed!

Cheers
 
Old 02-16-2010, 12:14 PM   #2
JimBrewster
Member
 
Registered: Feb 2010
Location: usa:/dev/random
Distribution: Slackware, Salix
Posts: 237

Rep: Reputation: 59
Well you could install grub. It's in the 'extra/' directory of the install DVD. I've always replaced lilo with grub once my install was up and running.
 
Old 02-17-2010, 02:54 AM   #3
jelezarov
LQ Newbie
 
Registered: Nov 2007
Location: /dev/urandom
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by JimBrewster View Post
Well you could install grub. It's in the 'extra/' directory of the install DVD. I've always replaced lilo with grub once my install was up and running.
Thank you for your suggestion!
It seems i'll have to give grub a try.
 
Old 02-17-2010, 03:39 AM   #4
uppman
Member
 
Registered: Jul 2008
Location: Stockholm, Sweden
Distribution: Slackware 13.1 32-bit
Posts: 145

Rep: Reputation: 24
You could also use Syslinux or Extlinux.

Please see the link below and look for: Replace Lilo/Grub with Extlinux

http://linuxconfig.dyndns.org/lazy/L.../Boot/Syslinux

/Magnus
 
Old 02-18-2010, 04:01 AM   #5
jelezarov
LQ Newbie
 
Registered: Nov 2007
Location: /dev/urandom
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 17
ext/syslinux seems to do the job... but

now the problem is - on my pc the motherboard (evga X58 Sli LE) won't boot the usb if it is ext formatted. When i format it with fat, the the initrd tree can not be copied on the stick with "Operation not permitted" error message. My laptop on the other side boots both ext and fat formatted usb flash, so the problem is probably related to the motherboard of the pc and i have no idea how to fix it - the bios just don't recognize the stick as "bootable".
 
Old 02-18-2010, 04:32 AM   #6
uppman
Member
 
Registered: Jul 2008
Location: Stockholm, Sweden
Distribution: Slackware 13.1 32-bit
Posts: 145

Rep: Reputation: 24
Quote:
Originally Posted by jelezarov View Post
ext/syslinux seems to do the job... but

now the problem is - on my pc the motherboard (evga X58 Sli LE) won't boot the usb if it is ext formatted. When i format it with fat, the the initrd tree can not be copied on the stick with "Operation not permitted" error message. My laptop on the other side boots both ext and fat formatted usb flash, so the problem is probably related to the motherboard of the pc and i have no idea how to fix it - the bios just don't recognize the stick as "bootable".
You don't need to copy the full /boot directory. The only things that need to be on the stick is syslinux, a kernel and initrd.gz.

/Magnus
 
Old 02-18-2010, 05:27 AM   #7
jelezarov
LQ Newbie
 
Registered: Nov 2007
Location: /dev/urandom
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by uppman View Post
You don't need to copy the full /boot directory. The only things that need to be on the stick is syslinux, a kernel and initrd.gz.

/Magnus
Thank you for helping me!

Without the initrd-tree it fails to mount the encrypted root fs - kernel panic "Unable to mount root fs on unknown-block" error.
 
Old 02-18-2010, 06:24 AM   #8
uppman
Member
 
Registered: Jul 2008
Location: Stockholm, Sweden
Distribution: Slackware 13.1 32-bit
Posts: 145

Rep: Reputation: 24
Quote:
Originally Posted by jelezarov View Post
Without the initrd-tree it fails to mount the encrypted root fs - kernel panic "Unable to mount root fs on unknown-block" error.
You must use the initrd.gz (not the initrd-tree) and perhaps tell it where to find the root partition.

Something like this:
root=LABEL=PUTLABELHERE rootfs=ext4
or
root=/dev/sdc1 rootfs=ext4

/Magnus
 
Old 02-18-2010, 07:02 AM   #9
jelezarov
LQ Newbie
 
Registered: Nov 2007
Location: /dev/urandom
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 17
Thumbs up

The "rootfs" thing fixed the problem! Big thank you, uppman!

Here is the short story, for anyone facing the same problem:

- Install the encrypted slackware, as described in "README_CRYPT.TXT" on the slackware-dvd
- After setup is complete, as described, create the new initrd image
- Copy the new initrd.gz and the generic kernel used for it on the flash stick
- The stick was formatted with FAT and marked as bootable
- Rename the kernel - it seems the long name don't work in syslinux.cfg - i use just vmlinuz for it
- Create syslinux.cfg on the stick - here is mine:

Code:
prompt 1
timeout 100
default  slack
label slack
	kernel linux
	append initrd=initrd.gz root=/dev/cryptvg/root rootfs=ext4
- mount the usb stick somewhere, go there, and:

Code:
#syslinux -d . /dev/sdb1
--- note that /dev/sdb1 is the flash stick and may be different

- put the usb stick in the pc, make sure it has boot priority in BIOS, reboot

- VOILA!!


Note: in my case i'll have to load the modules for my wireless keyboard in initrd or compile it in kernel, otherwise i can not enter the passphrase
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use desktop with usb-usb cable as external bootable optical drive for netbook seancarver Linux - Laptop and Netbook 3 11-02-2009 09:38 PM
Back-up AcerAspireOne fully to a USB stick (so that it is bootable) - any ideas? frank4360 Linux - Laptop and Netbook 2 11-06-2008 11:11 AM
External USB DRIVE - Not fully unmounting rperrine Linux - Newbie 2 07-30-2008 03:13 PM
Fully Linux-compatible USB hard drive jrdioko Linux - Hardware 4 07-19-2006 04:01 AM
Can't mount encrypted USB drive letrout Linux - General 1 02-08-2006 08:50 PM


All times are GMT -5. The time now is 05:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration