View previous topic :: View next topic |
Author |
Message |
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Thu Apr 08, 2010 1:38 pm Post subject: New HDD, new Gentoo install, adding new features ?? |
|
|
Hi.
I'm planning to change the disk in my laptop. I thought that this is a good chance to use some features I haven't been using yet. I'd like to ask you about info on the following topics:
1. EXT4 instead of EXT3:
How stable is EXT4 ?? Is it safe to store all my data on this file system (is it risky) ?? How fast and how power efficient (in terms of CPU usage) is EXT4 ??
2. 64-bit instead of 32-bit:
I could use the computational power. I'm now using a 32-bit Gentoo, since I've had problems in the past (about 3 years ago) with a 64 bit system. How many problems are there on a 64-bit Gentoo ?? How does "Wine" run on a 64-bit Gentoo ?? Do all the emulated apps work just as on 32-bit ?? Any major or common drawbacks ??
3. Encrypted /home or encrypted user directories instead a regular /home partition:
I'd like to secure my data. What's the best method to have a encrypted partition which would mount at start-up ?? By best I mean stable and easy to use.
4. Separated partitions:
What else besides / /boot and /home could be put on a separate partition ?? /tmp is sometimes used for CD/DVD coping, also significant amounts of data can be stored in /usr/portage/distfiles, /usr/share/games. I'd like to prevent any fragmentation of / . Any suggestions or am I just making stuff up ??
Thanks for any replies.
Machine:
Core 2 Duo 2.5GHz
4GB RAM DDR2
Nvidia 8600GT |
|
Back to top |
|
|
Letharion Veteran
Joined: 13 Jun 2005 Posts: 1344 Location: Sweden
|
Posted: Thu Apr 08, 2010 3:33 pm Post subject: Re: New HDD, new Gentoo install, adding new features ?? |
|
|
1. Ext4 is stable since late 2008.
Google uses it. Good enough for me. http://arstechnica.com/open-source/news/2010/01/google-upgrading-to-ext4-hires-former-linux-foundation-cto.ars
2. 64-bit instead of 32-bit
Not sure what this "computational power" you speak of is. First time I used 64-bit a few years ago, a lot of things didn't work. Since 2010, I use and install exclusively 64-bit systems. 5 installs done so far, on a quick count. No bit-nes related issues what so ever, afaik. I regularly run Spotify under wine, no problem. Don't use wine a lot more.
Edit: More precisely, since this https://forums.gentoo.org/viewtopic-t-774221-highlight-.html I started using amd64.
Can't really help with 3 and 4.
Last edited by Letharion on Thu Apr 08, 2010 3:41 pm; edited 2 times in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Thu Apr 08, 2010 3:33 pm Post subject: |
|
|
Gabriel_Blake,
Ext4 is fine.
64 bit multilib will run WINE, pure 64 bit will not.
Encrypted /home is fine.
Consider lvm2 so that you can dynamically create/destroy and resize partitions _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2253 Location: $TERM
|
Posted: Thu Apr 08, 2010 6:20 pm Post subject: |
|
|
1) Personally I don't find the ext family good for anything...so I don't use them. It's either jfs, reiser or xfs.
As of CPU usage, xfs is the best, reiser is the worst (but faster for smaller files consequently). jfs is good off overall.
2) You should not have problems with 64, the world is about to switch to 64...rams are easily crossing the 4 GB barrier, so you need to have a 64 bit system. Furthermore it's faster. I've never used 32 bit Linux and don't have any problems even running 32 bit applications.
You have no option. You have to use 64 bit.
3) mount a separate partition for your home folder...or actually the whole home folder is not recommended since applications store setting there. So make a separate partition which you would like to encrypt. This will make things faster also...encrypting just the needed. Then use device mapper to do the job.
Assuming device mapper supported from the kernel, and aes encryption is enabled -
cryptsetup -c <an algorithm like aes> -y create <a name> <the partition>
This will create a block device named <a name> in /dev/mapper/<a name>. Use it as a block device...mount it and all. Everything passing into it will go to <the partition> but will be encrypted.
To unmount <the partition> -
cryptsetup remove <a name>
and umount <the partition>
To mount back --
cryptsetup create <any name> <the partition>
If you do all this with local.start and local.stop, it's good.
4) If you just dual boot windows and Gentoo, no use having a boot partition.
I recommend a separate /usr partition for all distros, but for Gentoo a separate portage and distfiles partition is also useful. _________________ My blog |
|
Back to top |
|
|
na641 Apprentice
Joined: 27 Jun 2002 Posts: 169 Location: Eugene, OR
|
Posted: Thu Apr 08, 2010 11:35 pm Post subject: |
|
|
dE_logics wrote: |
You have no option. You have to use 64 bit. |
not true, im running 32bit with 4gb ram just fine |
|
Back to top |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2253 Location: $TERM
|
Posted: Fri Apr 09, 2010 3:01 am Post subject: |
|
|
na641 wrote: | dE_logics wrote: |
You have no option. You have to use 64 bit. |
not true, im running 32bit with 4gb ram just fine |
Post output of
You'll have problems if you use graphs card which shares memory with the system. _________________ My blog |
|
Back to top |
|
|
na641 Apprentice
Joined: 27 Jun 2002 Posts: 169 Location: Eugene, OR
|
Posted: Fri Apr 09, 2010 3:05 am Post subject: |
|
|
sure here you go
Code: | na641@emeralda ~ $ free -m
total used free shared buffers cached
Mem: 4052 3931 120 0 159 870
-/+ buffers/cache: 2901 1150
Swap: 6149 62 6087 |
|
|
Back to top |
|
|
na641 Apprentice
Joined: 27 Jun 2002 Posts: 169 Location: Eugene, OR
|
Posted: Fri Apr 09, 2010 3:06 am Post subject: |
|
|
also my graphics card does not use shared memory |
|
Back to top |
|
|
Letharion Veteran
Joined: 13 Jun 2005 Posts: 1344 Location: Sweden
|
Posted: Fri Apr 09, 2010 6:32 am Post subject: |
|
|
na641 wrote: | not true, im running 32bit with 4gb ram just fine |
I'm not gonna pretend to understand all the ins and outs of a 64/32-bit hardware/kernel/userland, but I do believe you will make better use of your memory with a 64-bit arch, as mapping the last parts of virtual mem with only 32-bit pointers becomes unnecessarily complicated. |
|
Back to top |
|
|
na641 Apprentice
Joined: 27 Jun 2002 Posts: 169 Location: Eugene, OR
|
Posted: Fri Apr 09, 2010 9:12 am Post subject: |
|
|
i'd have to disagree. PAE has been around since the original Pentium Pro. It's a hardware extension. 32bit systems can utilize up to 64G of ram. Benchmarks have shown the performance penalty is negligible. In fact enabling PAE is the only way for 32 bit systems to use the NX bit |
|
Back to top |
|
|
Letharion Veteran
Joined: 13 Jun 2005 Posts: 1344 Location: Sweden
|
Posted: Fri Apr 09, 2010 9:19 am Post subject: |
|
|
I stand corrected.
And slightly more knowledgeable. |
|
Back to top |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2253 Location: $TERM
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun Apr 11, 2010 9:35 am Post subject: |
|
|
dE_logics,
PAE extends the Physical Address space on 32 bit systems to 36 bits.
However you still only have a 32 bit instruction pointer and 32 bit pointers, so you get 64G of 4G chunks of RAM.
Like expanded RAM in early PCs, where you could swap any one of lots of 64Kb segments into the address space.
Each process still only as 4G max ... Its quite a bit less as its always a bad idea to swap the kernel out.
I recall, you keep 1G for the kernel and user processes get 3G max. You have more 3G user spaces.
The RAM is not contiguious with a 32 bit install as it in on a 64 bit install. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Sun Apr 11, 2010 12:48 pm Post subject: |
|
|
Thanks for the overwhelming response
I see that there are problems with flash on x86-64, but that can be fixed.
As to the file system. I've found these benchmarks:
http://www.debian-administration.org/articles/388
http://www.t2-project.org/zine/1/
One recommends XFS, and the other recommends JFS and totally bashes XFS, so I'm confused.
JFS really has nice results and low CPU usage, so I think I'll give it a try. Thank you very much
I have used Gentoo and ONLY Gentoo over the last 3 or 4 years No dual boot here.
Should I use a separate /boot partition with ext2 or not ?? I've always had it like so, but I've never wondered why. Why is it recommended ??
Since MOST of Gentoo users use 64-bit Gentoo I guess there is no reason to stay behind. Thanks for the encouragement
About the encryption issue:
I guess that what would suit me best, are user folders on separate partitions, every one encrypted with a different key (user password) and automatically mounted on user login (mounting only the folder of that particular user). This is so I can have, let's say, a "business" ans a "private" user account so that eg. Firefox would have different bookmarks, Thunderbird would download e-mails from different accounts, Fluxbox would have different theme settings etc.
Any ideas how to do it ?? What would be the best ciphering algorithm ?? I'm looking for safe, CPU efficient and reasonably fast. (btw... could anyone tell me how significant is the difference in CPU usage and read-write times when using an encrypted partition compared to a regular one ??) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun Apr 11, 2010 4:32 pm Post subject: |
|
|
Gabriel_Blake,
JFS and XFS are enterprise filesystems - you should operate from a UPS if you use them, unless you are insalling on a laptop.
Both keep a lot of data in RAM for long (compared to other fs) periods of time and this is lost when you lose power.
A seperate /boot is required when the BIOS cannot read the entire hard drive. This ensures that the files needed to boot are kept together.
Putting /boot at the front of the drive ensures that the BIOS can read it all. This first became an issue when drives reached about 528Mb and it has recurred several times since, as hard drives got bigger then BIOSes could cope with. Most recently it happened at 137Gb.
If you want the whole story, see the the large drive HOWTO on The Linux Documentation Project. tldp.org _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Wed Apr 14, 2010 6:50 pm Post subject: |
|
|
Honestly... I'm still not sure what to choose. And I'll have the new disk by tomorrow, so I have to decide fast
ReiserFS is a kinda bad idea for a laptop. The CPU usage isn't severe, but still. I've been using it on my desktop computer a few years ago and it was fine.
Ext4 by some benchmarks isn't as fast as ext3. And both seem a very generic solution.
JFS looks great, but it has a chance to crash after power shortage. This can be easily repaired, but requires a liveCD. I'm wondering if it's not a good idea to make a safe partition with let's say SystemRescueCD just in case it could be needed.
Any advice ?? Please. |
|
Back to top |
|
|
yzg Guru
Joined: 18 Jun 2005 Posts: 493
|
Posted: Thu Apr 15, 2010 4:17 am Post subject: |
|
|
I'm using ext4 and 64bit for sometime now without any problems. Extra partitions are good idea but use lvm to be able to adjust them later. But be careful with lvm and encryption of the /home directory or any other system directories. One day you will need to recover from s/w or h/w failures. |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
|
Back to top |
|
|
hendrikal n00b
Joined: 07 Dec 2008 Posts: 3
|
Posted: Sun Apr 18, 2010 5:39 am Post subject: |
|
|
Hello,
I'm using an encrypted /home partition with cryptsetup and luks. It was easy to setup and gentoo already has init scripts that take care of everything on system startup, all you have to do is enter the passphrase. I'm very happy with it.
In short what you have to do to make it work is:
- compile dm-crypt in the kernel, its under Device Drivers -> (x)Multiple device driver support (Raid and LVM) -> (x)Device mapper support, (x) Crypt target support. enable those with the (x)
- also in the kernel enable the ciphers you want to use (in Cryptographic API)
- make new kernel and restart if you have to
- emerge cryptsetup
- run 'cryptsetup -y --cipher serpent-cbc-essiv:sha256 --key-size 256 luksFormat /dev/sdXX' on the partition you want to encrypt (feel free to use a different cipher, the one I posted is considered secure though from what I read)
- make the now encrypted device useable by running 'cryptsetup luksOpen /dev/sdXX crypt-home', after you enter your passphrase you will be able to use the device under /dev/mapper/crypt-home
- create the filesystem of your choice on /dev/mapper/crypt-home, 'mkreiserfs /dev/mapper/crypt-home' for example
- mount it somewhere and copy your current /home/* over. 'mount /dev/mapper/crypt-home /mnt/tmp' and so on.
- open /etc/conf.d/cryptfs and use the example entry for encrypted home, should look something like this:
target=crypt-home
source='/dev/sdXX'
- change your fstab /home entry to something like: /dev/mapper/crypt-home /home reiserfs noatime 0 2
That should be it, restart and try it
There is lots of info on luks around, just google for it if you want to know more details. |
|
Back to top |
|
|
|