SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I'll try to do my best explanation, in fact, I always use 3 partitions on linux, one is for /, another for swap and the third is for home, in others distributions i only edit the fstab adding a new line with the uuid=(number) /home ext4 defaults 0 2, but tonight i decided beginning in slackware, and when i want to change the fstab result that is totally different to the others distribution of linux, that fstab doesnt has to add the UUID from a new /home, i dont know if the LILO is my problem, so i need your help, i'll be very grateful with you!
/dev/sda1 Windows
/dev/sda2 Slackware
/dev/sda3 Swap
/dev/sda4 This is a ntfs partition, here i have all my data from windows and linux,
i need to configure sda4 partition how the new /home of slackware, before i did it since fstab copying the uuid of sda4 from blkid and add it in fstab. but i couldn't do it now, i need help with it.
By default, Slackware will just use the drive mappings (/dev/sda2, /dev/sdb1, etc). UUIDs are not normally needed for most setups, and they can make it harder to understand what the fstab is doing for newer users.
But, there are definitely some setups where UUIDs are preferred (mine is one of them). UUIDs are unique to each partition and are generated every time you format the drive. If your mappings change when you plug in a thumbdrive, switch around hard drives, etc, then UUIDs are probably preferable to the drive mappings since they'll always point to the correct mapping, even if that has changed since your last reboot. They are also extremely handy to use for external devices (if you don't know if you're thumbdrive will be /dev/sdg or /dev/sdk since it changes all the time, you could reference it by its UUID). I switch my harddrives around a lot, and so it is much easier for me to just reference the UUID rather than try and remap all the mappings when they have changed.
If you want to switch to UUID in your fstab, you can easily do it by finding the corresponding UUID of the various mappings that are in there. Personally, I just use ls -la /dev/disk/by-uuid, but I know you can also use lsblk if you throw some arguments at it. You would just need to replace your "/dev/sda1" with "UUID=whatever-the-uuid-is" and leave the rest the same. Here's my fstab (I like everything to line up)
Now, if you have a reason other than preference to move your fstab to UUIDs, you should probably move your /etc/lilo.conf to UUIDs as well, because if the root drive changes, your kernel will panic on boot and you won't finish the boot process.
First, you'll need to change the boot drive to the disk ID (the drives themselves don't have UUIDs, only individual partitions, so if you don't want to reference it as /dev/sda, you'd need the disk's ID). To get the ID, you just check ls -la /dev/disk/by-id and match up the boot drive (you should see additional part1, part2, part3, etc for each partition on the drive, but you just want the main portion). As you can see below, in my case, /dev/sda matches up with: ata-Crucial_CT480M500SSD1_13440956798B, so in the lilo.conf file, I would change boot = /dev/sda to boot = /dev/disk/by-id/ata-Crucial_CT480M500SSD1_13440956798B.
Code:
jbhansen@craven-moorhead:~$ ls -la /dev/disk/by-id
total 0
drwxr-xr-x 2 root root 800 Dec 10 00:50 ./
drwxr-xr-x 8 root root 160 Dec 2 14:31 ../
lrwxrwxrwx 1 root root 9 Dec 10 00:47 ata-Crucial_CT480M500SSD1_13440956798B -> ../../sda
lrwxrwxrwx 1 root root 10 Dec 2 19:31 ata-Crucial_CT480M500SSD1_13440956798B-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec 2 19:31 ata-Crucial_CT480M500SSD1_13440956798B-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Dec 2 19:31 ata-Crucial_CT480M500SSD1_13440956798B-part3 -> ../../sda3
Next, you will need to change the root entry for each kernel you have set up. Instead of root = /dev/sda2, it would be root = "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d" (include the quotes). You can see a portion of my /etc/fstab below (I removed most of the commented lines to improve readability for me and I left in the previous references just commented out):
I'm not sure I understand what you want to do. If you want a separate /home partition, the easiest way to do that is during the installation. If you currently have /home under the / partition (sda2) that is where /home is. If you want to change sda4 to make it your /home partition you will need to move everything from under /home on sda2 to sda4 and format sda4 with a Linux filesystem. The problem with doing this is that is going to overwrite the data currently on sda4. Might be easier to shrink a partition and create a new /home partition.
By default, Slackware will just use the drive mappings (/dev/sda2, /dev/sdb1, etc). UUIDs are not normally needed for most setups, and they can make it harder to understand what the fstab is doing for newer users.
But, there are definitely some setups where UUIDs are preferred (mine is one of them). UUIDs are unique to each partition and are generated every time you format the drive. If your mappings change when you plug in a thumbdrive, switch around hard drives, etc, then UUIDs are probably preferable to the drive mappings since they'll always point to the correct mapping, even if that has changed since your last reboot. They are also extremely handy to use for external devices (if you don't know if you're thumbdrive will be /dev/sdg or /dev/sdk since it changes all the time, you could reference it by its UUID). I switch my harddrives around a lot, and so it is much easier for me to just reference the UUID rather than try and remap all the mappings when they have changed.
If you want to switch to UUID in your fstab, you can easily do it by finding the corresponding UUID of the various mappings that are in there. Personally, I just use ls -la /dev/disk/by-uuid, but I know you can also use lsblk if you throw some arguments at it. You would just need to replace your "/dev/sda1" with "UUID=whatever-the-uuid-is" and leave the rest the same. Here's my fstab (I like everything to line up)
Now, if you have a reason other than preference to move your fstab to UUIDs, you should probably move your /etc/lilo.conf to UUIDs as well, because if the root drive changes, your kernel will panic on boot and you won't finish the boot process.
First, you'll need to change the boot drive to the disk ID (the drives themselves don't have UUIDs, only individual partitions, so if you don't want to reference it as /dev/sda, you'd need the disk's ID). To get the ID, you just check ls -la /dev/disk/by-id and match up the boot drive (you should see additional part1, part2, part3, etc for each partition on the drive, but you just want the main portion). As you can see below, in my case, /dev/sda matches up with: ata-Crucial_CT480M500SSD1_13440956798B, so in the lilo.conf file, I would change boot = /dev/sda to boot = /dev/disk/by-id/ata-Crucial_CT480M500SSD1_13440956798B.
Code:
jbhansen@craven-moorhead:~$ ls -la /dev/disk/by-id
total 0
drwxr-xr-x 2 root root 800 Dec 10 00:50 ./
drwxr-xr-x 8 root root 160 Dec 2 14:31 ../
lrwxrwxrwx 1 root root 9 Dec 10 00:47 ata-Crucial_CT480M500SSD1_13440956798B -> ../../sda
lrwxrwxrwx 1 root root 10 Dec 2 19:31 ata-Crucial_CT480M500SSD1_13440956798B-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec 2 19:31 ata-Crucial_CT480M500SSD1_13440956798B-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Dec 2 19:31 ata-Crucial_CT480M500SSD1_13440956798B-part3 -> ../../sda3
Next, you will need to change the root entry for each kernel you have set up. Instead of root = /dev/sda2, it would be root = "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d" (include the quotes). You can see a portion of my /etc/fstab below (I removed most of the commented lines to improve readability for me and I left in the previous references just commented out):
I'm not sure I understand what you want to do. If you want a separate /home partition, the easiest way to do that is during the installation. If you currently have /home under the / partition (sda2) that is where /home is. If you want to change sda4 to make it your /home partition you will need to move everything from under /home on sda2 to sda4 and format sda4 with a Linux filesystem. The problem with doing this is that is going to overwrite the data currently on sda4. Might be easier to shrink a partition and create a new /home partition.
It probably could solve my problem, but i have a lot of data in that partition and i cannot make a backup of it, thats why i want to put it like my home in slackware, without modify the filesystem. now i have windows and linux using the same partition like home.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.