[SOLVED] fdisk / cfdisk fail to create correct partitions
Slackware - InstallationThis forum is for the discussion of installation issues with Slackware.
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.
Well, I got one more computer to try to install slackware64 14.2 on. Having major problems with standard procedure I've always used.
This machine had windows 10 home. By now that is gone. (edit-added..) I have no desire to have a dual boot machine, just linux. So I always erase any windows stuff. BUT some of the 'help' comments are built for 'dual boot' which is a distraction. I've erased all the UEFI partition, gpt, etc...; this IS a UEFI machine - my big mistake.
So - after finally getting the BIOS to allow to boot the DVD, I Used fdisk to delete partitions (/dev/sda1-sda4; /dev/sdb1, sdb2). sda is 256 GB SSD (sata); sdb is a new 1 TB HD installed at shop.
Used fdisk to 'create' swap and root partitions on sda; wrote to disk. fdisk would not allow to change 'type' from 'linux filesystem', but cfdisk will allow to pick 'linux swap', 'linux root x64', 'linux home', or leave at 'linux filesystem'.
Used cfdisk to create sdb1 as 'linux filesystem' (intended for /usr/local, no such option in 'type'), sdb2 as 'linux home'.
Cannot change 'root' partition on sda2 to 'bootable'. fdisk does not respond to 'a' command, and there is no 'boot' column in fdisk output.
Using cfdisk, same thing - it uses 'b' to make bootable, but on this machine 'b' has no effect at all. Also no 'boot' column in output (p).
I notice also that cfdisk - when printing out partition tables, describes partitions as 'NTFS', and 'Linux Filesystem' (or Linux root, or whatever. I'm spooked by the NTFS descriptor - shouldn't that be absent?
This machine DOES have a 'UEFI bios', with which I have *NO* experience. Per Slackware book, I tried to 'change' the 'secure boot' in bios to 'other system' option in computer setup (F2 on boot). Also changed an option from UEFI to 'LEGACY'. Not sure these were correct choices.
THEN, it called 'grub' in the slackware (DVD) install start, booting the 'huge' kernel. From then on it looked just like previous installs, until I reached the problem with partitioning described above.
I'm wondering if the selection of 'Linux root x64' in cfdisk MADE the partition bootable by default. I may try to 'continue' with the setup, formatting, etc and see what happens. If it doesn't fly, I'm pretty much toast with this box, until I get smarter somehow (suggestions?)..
There's a section in the 'setup help' about this UEFI, but I can't READ that while doing the install. I can't find a copy of this file online anywhere (?!?).
(edit) After looking around, I'm about convinced I've purchased an electronic pet rock. Advise anyone not trying to become a guru to stay FAR AWAY from anything with UEFI. Big mistake.
dont know but things are easier than when there were 4 discs to install .
The way i approach it , keep things as simple as possible, be lazy and do what works for you. Keep it minimalist .
I recently bought a new Hp PC with 64 Gig that had Windows 10 on it which since i think Windows 10 needs an allowance of circa 30gig , i decided to wipe everything and merrily wiped out the boot section as well. The good news is that you can put it back.
its 3 + gig so stick it on a 4gig usb using dd if=/path/to/slackware.iso of= /dev/xxx bs=16M
with my Hp laptop it had secure boot, so access BIOS and disable that and have boot being possible from usb.Stick usb in a female port power off. power up, hit f9 to get boot menu and select usb - it might say hard disk usb or brand. i found luckily that missing efi mini partition was missing and it told me what to do . which was to make size 100 MB of type EF00
drop out of install and create it using tool available and also told me what file type to make it. So basically just follow instructions. When you have partitions set up have a look at mine, there is just 3, it will say "install from" and you just select from menu from memory usb.
I'm sure others will fill in the gaps for me. When it says which partition to install root to, don't worry about /home necessarily since that still allows you to create users and i do have in my install /home/andrew even though i didn't create a specific home partition
now grub should not come into it, i was offered to install lilo , even though after installing the efi , it recognized it but said "install lilo anyway" well boot and braces has allows been my moto .
Last edited by captain_sensible; 10-15-2019 at 02:18 PM.
Boot from usb- make sure you don't miss setting up efi, my install noticed i didn't have it, or you could partition first
my partitions are just
/dev/sda1 : 100MB file type EF00
/dev/sda2 : Swap
/dev/sda3 : main install partition ext4
So probably since you have installed slackware before the only hurdle is the EFI and UEFI of your PC. cgdisk is a utility whereby you can create a new partition of the right format for the EFI boot stuff . It not that difficult i just played with it to create a EFI on a usb stick.
So basically select new , press enter to you get to size, enter 100M press return. Then type hexcode , type EF00
thats it for the efi
don't worry about the freespace entry before the efo
Last edited by captain_sensible; 10-15-2019 at 03:01 PM.
I already have install medium, the Slackware64 DVD. Shud hav mentioned that.
So reading the 'setup help' file, discovered 'cgdisk'. This seems to work better.
Now I have 5 partitions, sort of:
/dev/sda = 256G SSD (sata):
sda1 = EFI System (100M), format unknown (type EF00)
sda2 = linux swap (8 GB - same as RAM)
sda3 = linux x86_64 / (root remainder, about 230G)
/dev/sdb = 1 TB HD
sdb1 = 'Linux filesystem' (300G, for /usr/local)
sdb2 = 'linux /home' (632G for users)
Problems develop immediately in 'setup', trying to format
these. Formatted sda2 (swap) ok. Then setup switches to
sdb1 'for root' (!!) NOT what is wanted, and out of
sequence.
There used to be limits on 'number of partitions'...
Maybe I have too many? 5 ? Do I need an 'Extended
Partition' to hold some of them? Basically, 'setup'
wants to write a completely incorrect 'fstab'.
Except for the EFI, I've installed this way (same 4
Partitions) on other computers with exact same
hard drives, machines with no UEFI.
So since I cannot do 'setup' I have no 'system'. Some
docs out there talk about making EFI partition 'FAT32' as
yours is; but with no 'system' cannot even get to it to
do anything. How did you get it to be FAT32 ? Apparently
using code EF00 is not enuf.
edit PS: looking at 'UEFI Install...' docs by 'Rod Smith',
but seem pretty involved. I only WISH it could be just
KISS (simple).
well, I've got work to do; 'Linux only allows 4 primary partitions'
PC-BIOS partition tables only allow 4 primary partitions (and extended is a primary, a container for logical drives). This is not OS specific. If you don't like that legacy limitation you can always use LVM partitions. I'm a legacy guy myself :-)
P.S. You can have (practically) as many logical drives on an extended partition as you want. They daisy chain to work around limited addressing.
Last edited by TheRealGrogan; 10-15-2019 at 04:18 PM.
Unfortunately this is bogus. Supposedly, GPT drives 'do not need extended partitions', and 'can have as many partitions as wanted'...
In addition, there is no option to create any kind of 'extended partition' in fdisk with this GPT drive. Or with cfdisk, or with cgdisk. Option just not available.
Well then, why is Slackware setup unable to deal with 5 partitions???
With legacy bios, there's always at least one primary partition regardless of OS or partitioning methods. For example, with a PC bios, on BSD your "slice" is a primary partition and your disk labels are akin to logical drives.
I don't think you can boot from GPT partition tables without EFI.
As for LVM, your physical volume ("pv") is a primary. If you want to install Slackware to LVM partitions, I don't think you use "cfdisk" but LVM commands like pvcreate, vgcreate, lvcreate and friends. I'm not too familiar with it, but:
In other words, GPT drives (like mine) cannot be used with 5 partitions with Slackware, even tho this is NOT a UEFI limitation but a legacy limitation. This is not a useful situation.
OK - I've decided I really don't need part of the 1 TB drive for /usr/local, but will fit all of /root and /other except /home onto 230 GB - far more than it needs. Then /home will be the big drive, and a total of 4 partitions to assuage Slackware install's constraint to legacy 4 partitions.
running setup now, I'm sure I will need to do 'something' with that UEFI partition before it will be bootable.
Also, still unable to add a 'bootable' flag to / using any fdisk, cfdisk, or cgdisk or gdisk. This may be fatal.
The nearest lake is 100 mi away; probly not an environmentally sound idea anyway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.