OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Installing Debian To A Usb Flash Drive With A Swap Partition, How to minimize the damage
ShiroiKuma
post Oct 16 2007, 11:04 AM
Post #1





Group: Members
Posts: 902
Joined: 22-May 04
Member No.: 3,385



I'm considering doing the following thing:

I'd like to get a new USB flash drive that's fast.

Install a fully encrypted debian to it with only boot unencrypted, so that I can then use it to boot a computer with it and work on it, saving all the documents to it too.

I'd like to also have a swap partition on the drive, since I don't want to swap to an unencrypted swap partition on the host computer. Now obviously swapping will decrease the life of the flash drive.

What's the best way to minimize damage to it.

Some time ago there was talk about formatting a CF card, with leaving a part of it, i.e. 200 MB for a big one un mkfsed, as this would reduce the wear on the card. Would this be advisable here?

Also, will having a separate swap partition limit the wear just to these parts of the flash?

Probably not, since I want to install debian: create a 100 MB /boot (ext3) as primary partition, and make the rest of the hard drive one huge partition which has "Use as:" set to "physical volume for encryption".

Any thoughts on how to best go about this?

Also, since ext3 uses heavy journaling it's usually advised to set up flash drives as ext2, on the other hand, when the whole huge partition will be encrypted, maybe preventing data loss via using ext3 would be desirable?

Can anyone comment on this?

Thanks.

Later.
Go to the top of the page
 
+Quote Post
JohnX
post Oct 16 2007, 04:01 PM
Post #2





Group: Members
Posts: 126
Joined: 4-May 05
From: Lynnwood, WA, US
Member No.: 7,070



I'm afraid I don't know enough about current wear-leveling technology in flash drivers, but I can at least point you at another way to minimize how often swap is used:
CODE
echo 10 > /proc/sys/vm/swappiness

That will drastically reduce the tendency of the kernel to use swap when it doesn't *really need to.*
You might google for swappiness for info on how to tune it further.
Good luck!

-John
Go to the top of the page
 
+Quote Post
ZDevil
post Oct 16 2007, 09:47 PM
Post #3





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Would this be interesting to you?

http://www.saout.de/tikiwiki/tiki-index.ph...e=USBFlashMedia
Go to the top of the page
 
+Quote Post
ShiroiKuma
post Oct 17 2007, 05:39 AM
Post #4





Group: Members
Posts: 902
Joined: 22-May 04
Member No.: 3,385



Yeah, this is one of the guides I've been considering. From what I've read so far, it seems definitely that swap on flash won't do...
Go to the top of the page
 
+Quote Post
ShiroiKuma
post Oct 18 2007, 01:53 PM
Post #5





Group: Members
Posts: 902
Joined: 22-May 04
Member No.: 3,385



So, I tried doing something like this, though the easier way I think. Installed debian from a netinst CD to a USB stick. Made an unencrypted boot partition and an encrypted partition, using LVM. Installed the system to it.

Then ran:
install-grub --recheck /dev/sda
ran fine...
then in grub ran:
root (hd0,0)
setup (hd0)
ran fine...
Then ran update-grub.
Checked the /boot/grub/menu.lst on the stick, is fine.

But upon boot with the USB inserted, the system halts with a Boot Error.

The USB is bootable though, since I checked prior to install by putting a DebianLive image on it, and it would get me to the Grub menu. But here I don't get to the Grub menu.

The system is there, I can mount the lv's by hand etc.

So how can I make the USB bootable properly and get to the Grub menu upon boot?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th April 2014 - 02:29 PM