View previous topic :: View next topic |
Author |
Message |
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Thu Nov 06, 2014 1:49 am Post subject: Advice for a specific setup... |
|
|
Alright, I have yet to enjoy Gentoo and it may be due to trying this in VBox, so I have decided to convert a recent laptop to Gentoo. The system has 4GB of RAM and a 320GB HDD. Bearing in mind that I want the following partitions separate, is there any other advice for this specific setup?
- Build directory for emerge on its own partition
- Portage tree on its own partition
- Distfiles on its own partition
- Temp (/tmp) on its own partition
- Logs on their own partition
- Home on its own partition
- Var on its own partition
Based on the 320GB disk, what would you recommend? The laptop will run KDE4, but I will be installing the minimal KDE package and manually emerging the programs I want. I do not want the full-blown KDE experience. I may also install VBox for running the laptop licensed OS (Vista) virtually. If I do, I will create a partition (normally /vm) for that. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2023
|
Posted: Thu Nov 06, 2014 9:50 am Post subject: |
|
|
For that many separate areas on a (in modern terms) relatively small disk, I'd use LVM, not partitions, and start by allocating say 50% of that available. Then you can add space as you progress. Personally, I have fewer areas (/home, /var, /var/tmp (and /tmp bind mounted to a directory within that) and one for everything else). _________________ Greybeard |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Thu Nov 06, 2014 1:35 pm Post subject: |
|
|
I have only ever used LVM on multiple-disk setups. I honestly never thought about trying it on a single disk. My goal, as always, is to avoid fragmentation on systems where files that don't change much reside. I keep logs separate for this reason. They're always being added to, but things in /usr/bin are only changed when you do updates. Below is what I am planning to do this morning. Feel free to tell me if it is wrong in some way.
- <BIOS partition> 2MB
- /boot 100MB ext2
- / 4GB ext4
- /var 4GB ext4
- /var/tmp 16GB (1k clusters) ext4
- /var/log 1GB (1k clusters) ext4
- /usr 8GB ext4
- /usr/portage 4GB (1k clusters) ext4
- /home ~288GB ext4
- /tmp 1GB ext2
- <swap> 4GB
The drive is NOT advanced format, so the 1K cluster partitions should be fine. What say the pros?
Also, I know I am asking a lot of partitioning questions, but the reason is simple. Once I install I can only do a change via reinstall. |
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Thu Nov 06, 2014 2:23 pm Post subject: |
|
|
With 320GB, 100MB for /boot seems underwhelming. Personally, I prefer jfs for /var and /tmp. Also, having such a small /tmp may not work so well either (but I am no expert; I tend to abuse /tmp).
Here is my personal setup for reference:
gdisk:
Code: | Number Start (sector) End (sector) Size Code Name
1 2048 1050623 512.0 MiB EF00 ESI
2 1050624 2099199 512.0 MiB 0700 boot
3 2099200 35653631 16.0 GiB 0700 swap
4 35653632 304089087 128.0 GiB 0700 rootfs
5 304089088 371197951 32.0 GiB 0700 var
6 371197952 976762879 288.8 GiB 0700 home
7 976762880 1010317311 16.0 GiB 0700 tmp
8 1010317312 1949329407 447.8 GiB 0700 extra
9 1949329408 1953523119 2.0 GiB 0700 HP_TOOLS |
df -h:
Code: | Filesystem Size Used Avail Use% Mounted on
rootfs 126G 8.2G 112G 7% /
PARTUUID=d9a277e4-e84e-423c-996c-aa540f742e0e 126G 8.2G 112G 7% /
devtmpfs 7.9G 0 7.9G 0% /dev
tmpfs 1.6G 524K 1.6G 1% /run
shm 7.9G 44M 7.8G 1% /dev/shm
/dev/sda2 488M 3.5M 449M 1% /boot
/dev/sda5 32G 522M 32G 2% /var
/dev/sda6 289G 2.6G 287G 1% /home
/dev/sda7 16G 8.9M 16G 1% /tmp |
/etc/fstab:
Code: | # /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
#NOTE:If your BOOT partition is ReiserFS, add the notail option to opts.
PARTLABEL=rootfs / ext4 defaults,noatime,nodiratime 0 1
PARTLABEL=swap none swap sw 0 0
PARTLABEL=boot /boot ext4 defaults,noatime,nodiratime,nosuid 0 2
PARTLABEL=ESI /boot/efi vfat defaults,noatime,nodiratime,utf8=true,noauto 0 2
PARTLABEL=var /var jfs defaults,noatime,nodiratime 0 2
PARTLABEL=home /home jfs defaults,noatime,nodiratime 0 2
PARTLABEL=tmp /tmp jfs defaults,noatime,nodiratime,nodev,nosuid 0 2
#Do not automount
PARTLABEL=extra /mnt/extra jfs defaults,noatime,nodiratime,noauto 0 2
PARTLABEL=HP_TOOLS /mnt/hptools vfat defaults,noatime,nodiratime,utf8=true,noauto 0 2
#Devices
/dev/cdrom /mnt/cdrom auto user,noauto,exec,ro 0 0 |
All file systems are set up using their default settings. The /mnt/extra partition is a swath of space I use for playing (such as duping an entire partition, changing its fs, and moving it back) or for temporary storage of large data sets. _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it. |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Thu Nov 06, 2014 3:18 pm Post subject: |
|
|
I use one partition for /usr/portage and /usr/portage/distfiles, and one partition for /var (which takes care
of the log problem, and all the various stuff in the spool directories). I don't use a separate /tmp unless
I need a lot of extra space to build large packages, and when I do (eg. openoffice) I emerge a bin package
anyway. I have separate /boot (128MB) and /home partitions, and a bunch of very large partitions hung
off /home containing music and ARM code and other oddments.
LVM seems the best bet if you want to do a lot of shuffling around; but I'm not sure what a lot of partitions
gets you.
Will |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Thu Nov 06, 2014 6:24 pm Post subject: |
|
|
Why is 1GB small for temp? I normally use 256MB but wanted to go overboard here. I thought building was done in /var/tmp/something, not in /tmp. What is /tmp used for in Gentoo? I never used any of it in Debian, but that of course, is not Gentoo. I also only want 100MB for boot because I only expect to use one kernel. |
|
Back to top |
|
|
N8Fear Tux's lil' helper
Joined: 15 Apr 2013 Posts: 140 Location: Berlin (Germany)
|
Posted: Thu Nov 06, 2014 6:56 pm Post subject: |
|
|
100MB for boot is more than enough unless you plan on putting a rescue iso there.
The recommended way of dealing with /tmp is afaik tmpfs (and therefore it's in ram - mine is using about 4 MB right now). Building is done in /var/tmp/portage by default.
You should plan to use an additional (small) partition if you want to use GPT (either for the bios boot partition (around 4 MB should be ok) or for the EFI partition (no experience myself, but heard about 100MB should be a good start).
Personally I use on "normal" boxes just 3 partitions: /, swap and /boot - lvm never really worked for me (but the last time I tried it was about 10 years ago: I'm sure it matured a bit in the meantime). There are also the new FS types that include lvm functionality (more or less): BTRFS (in mainline and considered stable by upstream) and ZoL/ZFS (great filesystem but needs to be patched into the kernel/build as external module). Both provide the flexibility of LVM without needing LVM. |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Thu Nov 06, 2014 6:59 pm Post subject: |
|
|
I use /tmp on a partition so I can lock it down with noexec,nosuid,nodev. The few Linux viruses I read about in years past all executed from /tmp (normally scripts) so I figure if I lock it down, I am golden even if somebody creates something new. |
|
Back to top |
|
|
N8Fear Tux's lil' helper
Joined: 15 Apr 2013 Posts: 140 Location: Berlin (Germany)
|
Posted: Thu Nov 06, 2014 7:02 pm Post subject: |
|
|
The_Great_Sephiroth wrote: | I use /tmp on a partition so I can lock it down with noexec,nosuid,nodev. The few Linux viruses I read about in years past all executed from /tmp (normally scripts) so I figure if I lock it down, I am golden even if somebody creates something new. |
You can do the same if you use tmpf - and it even cleans itself up on reboot (as all data there is stored in memory). |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Thu Nov 06, 2014 11:34 pm Post subject: |
|
|
I'm using /tmp bound to /var/tmp/root_tmp on all my systems. So build get done on a separate partittion but I don't need another one for /tmp.
Code: | $ grep tmp /etc/fstab
/dev/sda6 /var/tmp reiserfs noatime,notail 0 3
/tmp /var/tmp/root_tmp none rw,noexec,nosuid,nodev,bind 0 0
|
Also I had one system with everything but /boot on LVM and I don't like it really. All that initrd crap.
If you plan it nice you'll rarely resize. And you can just boot a live cd (like System Rescue CD, which I also recommend as the Gentoo installation live cd) and resize your partitions and file systems.
From my laptop with a 256GB SSD:
Code: | # LC_ALL=C df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 18G 5.5G 12G 33% /
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 1.3M 1.6G 1% /run
shm 7.8G 96K 7.8G 1% /dev/shm
cgroup_root 10M 0 10M 0% /sys/fs/cgroup
/dev/sda3 2.0G 556M 1.5G 28% /usr/portage
/dev/sda4 3.9G 3.1G 570M 85% /usr/portage/distfiles
/dev/sda5 4.0G 1.4G 2.7G 35% /usr/src
/dev/sda6 12G 33M 12G 1% /var/tmp
/dev/sda7 3.9G 1.2G 2.5G 32% /opt
/dev/sda9 93G 60G 29G 68% /home
/dev/sda8 100G 28G 73G 28% /home/mjoziewi/projects
/dev/sda1 109M 40M 63M 39% /boot
|
I went a bit overboard with some of them, I know. |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Sat Nov 08, 2014 6:17 pm Post subject: |
|
|
Thanks for all of your help on both of my threads! The system boots fine on real hardware and I am FINALLY inside a Gentoo system! I must have to do something else with VBox to get it to work, but I don't care about that right now. I have just booted in and have two odd issues. First, eth0 is not starting. Second, all filesystems were checked, claiming the time was off, and the time was back by one hour.
The big issue here is that ifconfig is showing me only lo. Not my wireless NIC (support is in the kernel) or my hardwired NIC. I compiled most everything I needed into my kernel. I know, bigger kernel, but it keeps things neat for me. Now however, I seem to be stumped. The system does not see eth0 (Realtek 8101/8102) or my wireless NIC. The Realtek is listed as "RTL8101E/RTL8102E PCI Express Fast Ethernet controller". The wireless NIC is listed as "Intel PRO/Wireless 5100 AGN [Shiloh]". I did note that for some odd reason I have a single module loaded. The module is "e1000", which to my knowledge is a network driver, but I do not have an e1000 NIC.
The second issue appears to be the system not accounting for daylight savings since the time is off by exactly one hour. Or maybe it was due to the initial setup where the time was in UTC but set incorrectly. I have the following options set in /etc/conf.d/hwclock.
Code: |
clock="UTC"
clock_hctosys="NO"
clock_systohc="NO"
|
Maybe the next boot will be OK.
So what am I missing with the NICs? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Nov 08, 2014 8:08 pm Post subject: |
|
|
boot the livemedia, mount the gentoo partitions, enter the chroot, run cd /usr/src/linux;make menuconfig , edit menuconfig to include:
Quote: | -*- Networking support --->
-*- Wireless --->
-M- cfg80211 - wireless configuration API
[*] cfg80211 wireless extensions compatibility
<M> Generic IEEE 802.11 Networking Stack (mac80211)
<M> RF switch subsystem support ----
Device Drivers --->
[*] Network device support --->
[*] Ethernet driver support --->
[*] Realtek devices
<M> Realtek 8169 gigabit ethernet support
[*] Wireless LAN --->
<M> Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ul
<M> Intel Wireless WiFi DVM Firmware support (NEW) | recompile and recopy the kernel, emerge linux-firmware iw wpa_supplicant wireless-tools , configure networking for gentoo net scripts, or dhcpcd, or wicd, or networkmanager or , reboot to the installed gentoo, check ifconfig -a to see if the kernel found your NIC's and what names they have, ifconfig to see if they are up _________________ Defund the FCC. |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Sat Nov 08, 2014 10:31 pm Post subject: |
|
|
Thanks, I am fairly sure those were already set in my kernel, but I will double-check. I have not emerged wireless-tools. I did emerge dhcpcd. I intend on using networkmanager in KDE, so should I keep dhcpcd and emerge networkmanager? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54421 Location: 56N 3W
|
Posted: Sat Nov 08, 2014 10:59 pm Post subject: |
|
|
The_Great_Sephiroth,
What does ifconfig -a tell about your interfaces?
udev will have renamed your interfaces away from the kernel names eth0 and wlan0 unless you told it not to. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Nov 09, 2014 12:15 am Post subject: |
|
|
only one of net scripts, dhcpcd, networkmanager, wicd for network management. See the gentoo wiki for howto's. dhcpcd and wpa_supplicant will be used by network manager. as we (I) try to confuse you, keep asking. _________________ Defund the FCC. |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Sun Nov 09, 2014 2:51 pm Post subject: |
|
|
You're not confusing me. In fact I had everything you told me to check in my kernel checked. I built my support directly into the kernel however. I build modules for things that can be removed, like Bluetooth adapters. Things which are a part of my physical system, I build in. I did NOT have the 8169 driver checked however. I unchecked the others and checked it. My kernel is now compiling.
What you say makes sense to me about the networking managers. I will remove dhcpcd and install networkmanager since I am familiar with it in the Debian world and should be able to use it here. With that said, how do I purge the binaries and configuration files, scripts, etc for dhcpcd?
*UPDATE*
Alright, I remove dhcpcd, but I seem to have an issue. When I try "emerge networkmanager" I get loads of errors. It tells me then that I need to change some USE variables to include things like "networkmanager" and "kde", but those are in my USE variable. Am I missing something? |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Sun Nov 09, 2014 4:09 pm Post subject: |
|
|
Wait, I believe I am starting to understand some of this and it seems very odd. Does networkmanager REQUIRE a desktop in Gentoo? I do not need a desktop to use it in Debian. I normally install all of my shell utilities and then install my desktop. How can I do this in Gentoo? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Nov 09, 2014 6:43 pm Post subject: |
|
|
Do you now have interfaces in ifconfig -a output?
nmcli is part of the networkmanager package and can be used from the CLI terminal..
What profile have you selected? If choice 6 or 7 appears with an asterisk: Code: | eselect profile list |
Quote: | Available profile symlink targets:
[1] default/linux/amd64/13.0
[2] default/linux/amd64/13.0/selinux
[3] default/linux/amd64/13.0/desktop
[4] default/linux/amd64/13.0/desktop/gnome
[5] default/linux/amd64/13.0/desktop/gnome/systemd
[6] default/linux/amd64/13.0/desktop/kde
[7] default/linux/amd64/13.0/desktop/kde/systemd
[8] default/linux/amd64/13.0/developer
[9] default/linux/amd64/13.0/no-emul-linux-x86
[10] default/linux/amd64/13.0/no-emul-linux-x86/desktop
[11] default/linux/amd64/13.0/no-multilib
[12] default/linux/amd64/13.0/x32
[13] hardened/linux/amd64
[14] hardened/linux/amd64/selinux
[15] hardened/linux/amd64/no-multilib
[16] hardened/linux/amd64/no-multilib/selinux
[17] hardened/linux/amd64/x32
[18] hardened/linux/musl/amd64
[19] default/linux/uclibc/amd64
[20] hardened/linux/uclibc/amd64
| Any package you choose to emerge that has the option to be built with support for the kde use flag will be built or rebuilt with the kde use flag and building kde packages will be triggered.. If you selected some other profile but have USE="kde" in /etc/portage/make.conf the same result will happen. If you choose to emerge a package that has a hard dependency on kde (kde use flag) coded in the package or specified in /etc/portage/package.use building kde will be triggered. Under these conditions; if kde exists on the system already the dependency is satisfied and kde will not merged again unless updated versions of some or all kde flagged packages exist; in that case updates will be merged. This is better explined in parts 2 and 3 of the handbook.
The stage 3 you installed was basic for profile 1.
for wired etherne now, you can: enter the chroot and emerge -1 dhcpcd, reboot to the installed system, run ifconfig -a, determine your wired interface name, run dhcpcd <interface name>, check connection with ping -c2 8.8.8.8, check name resolution with ping -c2 google.com. _________________ Defund the FCC. |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Sun Nov 09, 2014 10:08 pm Post subject: |
|
|
Wow, that makes sense, but this is going to make installing a beast. In every distro I have ever used, I start by installing things like SSH, screen, ntp, sudo, lzma, bzip2, cups, alsa, etc. Then I install the core X server, then just the core KDE components, then I install just the stuff I want in KDE, and finally I do LibreOffice and extras like Flash. Are you saying that I cannot do this with Gentoo? I like minimalistic installs and it appears as though a few things (SSH for example) are installed by default already.
With that being said, I did use profile 6 (KDE without systemd) when installing. Should I set profile 1, do my shell utilities, change to 6, then do X and KDE? Will network manager even work at that point? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Nov 09, 2014 10:56 pm Post subject: |
|
|
if you get lucky the big emerge would happen without blockers and slot conflicts while you read a good book and that would be the easy way to move toward your ultimate goal.
You can revert to profile 1 and a blank USE= in /etc/portage/make.conf and then emerge --sync, emerge -uNDav world, emerge --depclean, etc-update, emerge gentoolkit, revdep-rebuild, emerge -pv networkmanager, take a look at what packages are slated to build and what USE flags are invoked particularly for network manager. This will be the hard way. Individual USE flags can be controlled in make.conf (globally), per package (package.use), or per emerge (USE="-X -kde" emerge foo). X kde says invoke the X kde flags. -X -kde says do not use X or kde support or dependencies in building foo. _________________ Defund the FCC. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sun Nov 09, 2014 11:04 pm Post subject: |
|
|
You may want to emerge app-portage/ufed at this point, it will show you what USE flags are already enabled, although emerge --info will show all current settings and software versions as well. Generally, you do not want to emerge anything without going over your /etc/portage/make.conf first. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Sun Nov 09, 2014 11:11 pm Post subject: |
|
|
Maybe I need to learn more about USE flags first. I went ahead and wiped the laptop clean (zeroed it thanks to dd) so I can try again after I grasp more of this. My current understanding was that the USE flags allowed you to compile support for things your system would be using. Prepare to laugh, but I had a USE variable a mile long. I set things I did not want first, such as "-systemd". Then I set things my CPU supported, like "sse4_1". Then I set flags for things I KNOW I will be installing, like KDE, SSL, MySQL, various libraries, etc.
Is this not correct? Am I supposed to set it, install some things, set it again and install others, etc? If I did do it correctly, then I will simply set it like I had it before, install my basic needs, then emerge X and KDE first, followed by my apps. That will not bother me one single bit. It is simply reverse from what I have been doing, but it wouldn't be wrong, would it?
Now, what are these "package.use" files? I assume I would do an emerge with "--fetch-only" and then set the flags in these files? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sun Nov 09, 2014 11:22 pm Post subject: |
|
|
You install the base system, reboot into your base Gentoo.
You run emerge-webrsync and emerge -avuND system to bring it up to date.
Make sure your desired profile is set, run emerge --info to see all settings in force.
If you are happy with what you see proceed with installing by running emerge -avuND world.
Keep in mind whatever you do can be undone, unless you do something really stupid with rm command. Trashing your install and starting from scratch was unnecessary. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Mon Nov 10, 2014 12:14 am Post subject: |
|
|
I know it was, but I enjoy redoing it, learning, and doing it again. It was how I originally learned Linux back in the 90's. I am honestly having a LOT of fun with Gentoo, and I haven't even made it into KDE yet. I haven't enjoyed Linux this way in a LONG time, and it was probably due to the boring installations of binary distros. Now I get to tweak packages for my individual systems, and that is fun, even if I hit a road-block and ask for help. I am planning on moving to Gentoo once I have the steps down pact in my head.
I guess one good thing DID come from systemd. I finally took the plunge and jumped into Gentoo! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|