Updating New Kernel and / for slackware replace 14.1 with 14.2 (partitioning)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Updating New Kernel and / for slackware replace 14.1 with 14.2 (partitioning)
When I setup my partitions I gave my / not enough space. I also have a small /boot partion which has 500M.
/dev/sda1 swap
2GB /dev/sda2 extended
/dev/sda5 / ext3 100% used
/dev/sda3 /boot ext3 63% used
/dev/sda4 /home ext3 22% used
tmpfs /dev/shm 0% used
My Xorg doesn't boot so reinstall upgrading packages hope fixes it. I had some problems my root is too full. I need a way to expand its size or clear and reinstall. Not sure why X wont boot, it only boots with root login. I don't believe I created a swap partition either, I ended up created a tmpfs using RAM i think.
Last edited by Nickademus; 08-04-2018 at 03:19 PM.
Reason: misspelling in title, wrong versioning.
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304
Rep:
if your sda4 and sda5 are right next to each other, you can copy your home dir to /, then unmount /home, remove /dev/sda4, and use gnu parted to to resize your partitions.
it would be much easier to remove everything and start over with a combined home and root.
if your sda4 and sda5 are right next to each other, you can copy your home dir to /, then unmount /home, remove /dev/sda4, and use gnu parted to to resize your partitions.
How can they do this if it is root / that is 100% full ?
Quote:
I don't believe I created a swap partition either, I ended up created a tmpfs using RAM i think.
Then what is your first partition sda1 ?
Quote:
/dev/sda1 swap
Your partition listings are missing the actual sizes which are needed to provide good advice. It should be possible to shrink your large /home partition and create new /usr and /var partitions. You would then migrate these directories in / to separate partitions thus freeing up space in /. You need more information in terms of actual sizes to do this.
Last edited by tofino_surfer; 07-30-2018 at 02:11 PM.
I don't believe I created a swap partition either, I ended up created a tmpfs using RAM i think.
Did you read your own post ? The first line is /dev/sda1 swap so you do have a swap partition on /dev/sda1. The formatting is bad but it may have a size of 2GB.
Code:
/dev/sda1 swap
2GB /dev/sda2 extended
/dev/sda5 / ext3 100% used
/dev/sda3 /boot ext3 63% used
/dev/sda4 /home ext3 22% used
tmpfs /dev/shm 0% used
The first thing you should do post the parted output for /dev/sda with all of the partition sizes in a CODE block to keep all of the spaces. Edit your post in advanced mode and press # to get the CODE tags. Paste your parted output for sda inside these tags. Enter sudo parted /dev/sda and type print at the (parted) prompt.
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304
Rep:
Quote:
if your sda4 and sda5 are right next to each other, you can copy your home dir to /, then unmount /home, remove /dev/sda4, and use gnu parted to to resize your partitions.
How can they do this if it is root / that is 100% full ?
I don't use Slackware but just looked this up. Slackware 12.2 was released in Dec2008, 9.5 years ago! Why do you want to upgrade to a 9.5 year old release ? The latest release according to Wikipedia was 14.2 / 30 June 2016; 2 years ago.
Also you have a strange partition arrangement where sda2 is the extended partition. Since logical partitions are normally contained all inside the extended you can't easily use the extra space inside your 299GB home sda4 partition.
Adding these two factors together it is best that you simply backup your data and install a new OS. I also recommend using GPT formatting this time as it will work with legacy BIOS on Linux. Although you could install 14.2 since you obviously are a newbie who misspelled Kernel (it's e not a) in the subject line I recommend you switch to an easier and more current distribution.
Thanks tofino_surfer, thats why I am here. I am a newbie! But from what I understand slack is not over bearing to newbies as any other os. I prefer stable system over brand new+easy anyway. Just wondering, backup my /home. What are the best backup commands for backing up a device or partition and best platform, another internal drive or a usb drive? Slack does have long release times, rumor of a new release coming.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
Your HDD is a bit small for modern usage. I would suggest you back up any files you want to keep, install a larger drive, install a more current OS, and restore your back up.
Thanks tofino_surfer, thats why I am here. I am a newbie! But from what I understand slack is not over bearing to newbies as any other os. I prefer stable system over brand new+easy anyway.
There is a difference between stable and obsolete and unsupported. Slackware 12.2 is EOL as of December 9, 2013 and has received no security patches since then. Even if you want to stick with Slack go with 14.2. Slackware 13 is over 6.5 years old as well. If you just want stability go with Centos 7, easier to install and supported until 2024.
Just wondering, backup my /home. What are the best backup commands for backing up a device or partition and best platform, another internal drive or a usb drive?
To back up a file system rsync --archive is simplest. For an entire partition you can use dd to backup to a compressed file which can then be restored somewhere else. There are many examples online of how to do both. You could use an internal drive but an external one can be disconnected and powered down when not in use which is safer.
His /home is 299GB 22% used, so disk size should be no issue unless later he plans to accumulate lots of video files.
With the right partitioning software, which automatically sizes and locates extended as integral part of other operations, on booted removable media:
1-sort partition table into logical order
(2-eliminate the gap between "extended" (sda2) start and current sda5)
3-create new primary sda1 in space freed by step 2
4-copy existing sda3 /boot content into sda1 space
4-delete existing sda3 /boot
5-convert existing sda5 to primary sda2 (eliminating extended)
6-shrink existing sda4 ~22GB
7-convert existing sda4 primary to logical sda5
8-move new sda5 up disk ~20 GB
9-create new sda6 swap at end of disk 2GB
10-grow new sda2 into the 20GB space freed by moving new sda5, making sda2 ~39GB
11-reinstall bootloader
Result will be in logical order looking approximately thus:
sda1 /boot <1GB primary
sda2 / 39GB primary
sda3 or sda4 extended
sda5 /home logical ~277GB
sda6 2GB swap logical
I have a similar sized setup, that has Linux 2.6 (Slackware 13.37), and Linux 4.4 (Slackware 14.2) on it. I skipped over Slackware 14.1.
I have two 64GB partitions for Linux. This allows me to install an updated Linux, while still using the old system.
I have 14 partitions, but that could be cut down to fewer. Just 8 larger partitions might have worked better as I would not have had to split some data.
BOOT 40 MB (just images, and /BOOT)
PART4 64 GB (Linux 4.4)
SWAP 800 MB (which is a little small, but if you are swapping this much often then you have problems, some programs require more).
PART6 64 GB (Linux 2.6)
more data partitions, FreeDOS, etc.
I do NOT put home in a separate partition. That just asks for trouble.
I user mount the other partitions and my user can access directories on them as they need.
This is robust, it does not break down during maintenance operations, and backup is nicely separated.
The /home is backed up, the other partitions are only backed up as needed.
This means that both PART4 and PART6 have a user directory, so I am still accessing some directories using
soft links to the other directory. This may change for big projects, which I may move to one of the
other partitions. The whole point of having two bootable partitions is to be able to boot either one
as needed, and still having everything work. I do have software on Linux 2.6 that won't run on Linux 4.4.
This way, it always works.
If you really want a common home directory, you can do it that way too.
My install is using 31.5 GB of the partition for Linux 4.4, and 3.5 GB of that is user data.
I have compilers and most tools installed, but not GNOME stuff (which is bulky).
So each of your Linux install partitions should be at least 32 GB.
If you want to install some of those large games, they may take about 2 GB each, so you could give yourself an extra 16 GB.
In that BOOT partition, I have the ability to boot 8 images, which include Linux 2.2, Linux 4.4 HUGE, and several Linux 4.4 custom compiled.
The custom compiled Linux will coexist on the same partition, and will share the same /usr/bin, /lib, and /usr/lib. Each custom Linux kernel only requires its own /lib/modules and /boot directories.
With tuning, I usually have 3 or 4 kernels that can boot per partition.
So for Linux 4.4, I have the original Linux 4.4 Huge (from the Slackware install), and two custom kernels.
In my custom kernel I got rid of the raid stuff and a great number of things I cannot use, and added some special devices, and it is specific for Athlon.
The way I fix partition problems is using a boot CDROM.
Get Linux running off the Boot CDROM, then start moving directories to your partitions at the far end of the drive.
You can then delete and remake the low end partitions.
Then you move everything to the low end partitions.
You can then delete and remake the high end partitions.
You can try and do this with the partition programs but then they sometimes complain instead of doing what you want.
Safer to just move it yourself if you got that much room.
I do not recommend using a memory stick. I did backup that way once, it took 16 hours to complete the write.
Backup to a terabyte drive connected by USB only took about 2 hours.
If you really like your install selections, I suppose you could save the partitions.
If your drive is 100% full, then it is likely that the last install is messed up anyway. Running out of disk space means that the
install programs cannot even save state properly. The often do not recover gracefully, leaving the disk full and the install half done.
Before resizing the partitions, remove some of the last packages installed to get some wiggle room.
But there is an alternative.
One thing you can do is recreate your install.
Just save /var/log/packages, and possibly /etc/.
Save your /home directory using tar. Put it someplace safe.
You do not need to save the other directories as they will be created anew from the install.
After you recreate your partitions with the right size, reinstall Linux.
Go through your list of packages, and install any optional packages you missed.
If you had any special setup, then copy over some of your saved /etc files.
Whether you want to use GPT depends on whether you have any other OS on a separate partition.
If they don't understand GPT then you cannot use GPT.
GPT is really best when you have a really large drive with many partitions.
If you are only going to have Linux on 4 partitions, then it does not matter much.
I have 14 partitions using the same old DOS partitions.
Just let the newer FDISK do what it wants. It wants to put things on cylinder boundaries, which is not absolutely necessary.
But FDISK won't be happy until you let it make the partitions on cylinder boundaries. It is more efficient in head travel.
If you are in doubt about SWAP size, then make it 1 GB. It is really hard to work around when you run out.
I have only run out of SWAP when trying to compile Mesa, which is a major hours long effort.
I hope some of this is helpful.
Last edited by selfprogrammed; 08-05-2018 at 04:39 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.