why does debian isntaller add extended partition

If none of the more specific forums is the right place to ask

why does debian isntaller add extended partition

Postby MagicPoulp » 2020-03-02 19:49

Why does the debian installer add an extended partition? What is its purpose I cannot find doc about it.

And why does sda4 get skipped in the list?

I just asked for a swap, a primary, an efi, and a fat32.

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 196265983 196263936 93.6G 83 Linux
/dev/sda2 196268030 229468159 33200130 15.9G 5 Extended
...
/dev/sda6
MagicPoulp
 
Posts: 292
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

Postby Deb-fan » 2020-03-03 03:37

Because you went with mbr instead of gpt, mbr disks only accomodate 4 primary partitions or 3 and an extended on which many logical partitions can be set up. The extended partition is sda4 there and the first partition setup on it is sda5(the fifth partition) The answer is pre-partition, format as a person pleases or use the partitioning tools the installer provides for the purpose and then manually tell the installer what's to be used/where, like which partition /root is on etc. Most folks with a system capable of it are going to opt for gpt vs the older mbr deal. To get around the limitations use of mbr imposes.

Edit: Not like mbr won't work fine depending on use, size of drive etc. Nothing wrong with questions ... Everybody had to learn about this stuff at one point. For what you're describing think the Debian installer made the best choice, giving you the most flexibility in rearranging partitions to best suit your needs/preferences. :) Converting to gpt instead of mbr and having to reinstall may not be the right move, depending. Other things could be relevant, such as LVM or use of the btrfs filesystem but if just starting out often better to keep things simple till a person has the basics down.
Deb-fan
 
Posts: 679
Joined: 2012-08-14 12:27

Re: why does debian isntaller add extended partition

Postby p.H » 2020-03-03 09:40

When selecting guided partitioning with a DOS/MBR partition table, the Debian installer creates the root/boot partition as a primary partition and other partitions (swap, /home...) as logical partitions inside an extended partition. If you do not like it (I do not, for this and other reasons), do not use guided partitioning. When selecting manual partitioning, you can choose to create primary or logical partitions as you wish.

The extended partition is a primary partition. It can be any of the 4 primary partitions, not only #4. In the above example, it is #2.
#1 to #4 are reserved for primary partitions, even if unused ; so logical partitions always start at #5.

An EFI partition suggests that you want to set up the drive for EFI boot. Note that some UEFI firmwares can boot in EFI mode only with GPT, not DOS/MBR.
p.H
 
Posts: 1291
Joined: 2017-09-17 07:12

Re: why does debian isntaller add extended partition

Postby MagicPoulp » 2020-03-03 11:22

OK thanks for the info.

I don't remember if I picked guided or manual partitioning.
But I did defined myself each partition and its size in an empty space.

Not sure but it seems to me that the graphical installer chose MBR automatically even if I picked the manual setup.

I could resintall. I did not succeed to boot my system yet (see my other question).
MagicPoulp
 
Posts: 292
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

Postby p.H » 2020-03-03 12:23

If you could define each partition and size, then you picked manual partitioning.
Manual partitioning does not create a new partition table unless you tell it so.

When you ask to create a new partition table on a disk, in normal install the partition table type is selected automatically depending on the boot mode (EFI -> GPT, BIOS/legacy -> DOS/MBR) and possibly disk size (> 2 Tio -> GPT). In expert install, you can select the type.

The graphical and text installers behave the same, only the display is different. Not talking about the Calamares installer in live images.
Last edited by p.H on 2020-03-04 08:29, edited 1 time in total.
p.H
 
Posts: 1291
Joined: 2017-09-17 07:12

Re: why does debian isntaller add extended partition

Postby MagicPoulp » 2020-03-03 16:01

but if EFI is newer, it should use the newer GPT.

And if BIOS/legacy is older, it should use the older MBR:

So why is it the other way around? To make things sure to work for "unadvanced people"?
OK sure, but then why would bios legacy use GPT?

wikipedia:
"EFI replaces the legacy Basic Input/Output System (BIOS) firmware interface originally present in all IBM PC-compatible personal computers,"
MagicPoulp
 
Posts: 292
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

Postby Deb-fan » 2020-03-03 16:53

Googled up a command which is supposed to show what a gnu/nix os is booted as EFI or legacy-mode.

Code: Select all
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS


Output says bios, it's in legacy mode. Bios were used in fairly recent systems too, newer versions have more capabilities, such as having gpt support and one reason you'll see people upgrade their motherboard bios or firmware version, extended features. Support for more Max ram etc. Think gpt really plays a role in modern drives, when someone had 2-4 terabytes of space the limitations of using an mbr partition table isn't adequate and gpt is a marked improvement. Mentioned things like LVM and btrfs filesystem(s) render partitioning irrelevant anyway. Someone can set up, tear down, resize and rearrange such things very easily. Outside of reading haven't used either, this old thing is bios/mbr and works fine for how I use it. Need to dork around more with filesystems like btrfs cause it has some really interesting features others lack and is considered well stable enough for use on personal systems by this point.
Last edited by Deb-fan on 2020-03-03 17:23, edited 1 time in total.
Deb-fan
 
Posts: 679
Joined: 2012-08-14 12:27

Re: why does debian isntaller add extended partition

Postby Head_on_a_Stick » 2020-03-03 17:13

MagicPoulp wrote:but if EFI is newer, it should use the newer GPT.

And if BIOS/legacy is older, it should use the older MBR:

So why is it the other way around? To make things sure to work for "unadvanced people"?
OK sure, but then why would bios legacy use GPT?

In this case p.H has made a (very rare) mistake — the installer uses a GUID partition table if booted in UEFI mode and an MS-DOS partition table if booted in non-UEFI mode.
User avatar
Head_on_a_Stick
 
Posts: 11454
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: why does debian isntaller add extended partition

Postby Deb-fan » 2020-03-03 17:32

Brings up whether the CSM thing (legacy compatibility) is enabled in OP's firmware/uefi too. Many wheels have already been reinvented, much info already well covered in any of tons of install how-to's as well and you/Head_on already informed OP of the benefit of using the unofficial install iso which already includes nonfree drivers-etc. Round and round in circles we go. :)
Deb-fan
 
Posts: 679
Joined: 2012-08-14 12:27

Re: why does debian isntaller add extended partition

Postby MagicPoulp » 2020-03-03 18:17

The bios is very recent. CSM is disabled in the bios. But that does not mean the debian isntaller is not free to boot the way it wants.

It seems natural that the debian installer wil ltry to boot in the legacy mode to make sure it works on most machines. So it is possible that Head on a stick is right (rare) that the legacy boot leads to old MBR.

I am still stuck about booting on usb. It seems linked to the power management configuration in the kernel. See my other thread question about ssd if you are interested. I have a hard time understanding the other issues of people that had the same error "EXT4-fs error (device sdb2): ext4_find_entry:1455".
MagicPoulp
 
Posts: 292
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

Postby Deb-fan » 2020-03-03 18:34

Come on what's your game here? Now there's a power management issue involved. Started off with Debian's installer did this, later changes to you're fairly sure you did it manually taking the di out of the equation. Capable of searching out info that newer bios can handle gpt and know and are able to confirm CSM is disabled in firmware, though unable to find/follow any of the many quality how-to's which cover all this, many step by step, more than a few with pictures? Feel I'm/others are getting mega-trolled here and jumping off this merry-go-round before I get any dizzier, fall down and hurt meself. :P
Deb-fan
 
Posts: 679
Joined: 2012-08-14 12:27

Re: why does debian isntaller add extended partition

Postby Head_on_a_Stick » 2020-03-03 18:37

MagicPoulp wrote:CSM is disabled in the bios. But that does not mean the debian isntaller is not free to boot the way it wants

The installer won't be able to boot in non-UEFI unless CSM is enabled.

I've just tried booting the installer in UEFI mode with an MS-DOS partition table and it shows this message:

Image

Did you see that? I think you may be mistaken about your motherboard's CSM setting.
User avatar
Head_on_a_Stick
 
Posts: 11454
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: why does debian isntaller add extended partition

Postby MagicPoulp » 2020-03-03 19:38

Deb-fan wrote:Brings up whether the CSM thing (legacy compatibility) is enabled in OP's firmware/uefi too. Many wheels have already been reinvented, much info already well covered in any of tons of install how-to's as well and you/Head_on already informed OP of the benefit of using the unofficial install iso which already includes nonfree drivers-etc. Round and round in circles we go. :)


No need of an unofficial debian when one can install an official one. The firmware can be installed after installation and in a more "official way". THere are millions of unofficial how tos that are wrong.
MagicPoulp
 
Posts: 292
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

Postby MagicPoulp » 2020-03-03 19:46

Deb-fan wrote:Come on what's your game here? Now there's a power management issue involved. Started off with Debian's installer did this


Well there was a power issue on SSD drives of the same manufacturer in kernel 4.10. So it it possible I encountered a similar issue. Probably a different issue since debian 10 has kernel 4.19.

https://wiki.archlinux.org/index.php/So ... drive/NVMe
"Samsung drive errors on Linux 4.10

On Linux 4.10, drive errors can occur and causing system instability. This seems to be the result of a power saving state that the drive cannot use. Adding the kernel parameter nvme_core.default_ps_max_latency_us=5500[3][4] disables the lowest power saving state, preventing write errors. "

Well I tried to boot with that option and it did not work.


update:
the system boots on usb 2, but not on usb 3 though it was install faster on usb3.

update2:
the system can now boot on usb3 with the help of a kernel 5 from backports.

Thank you all of you (even Deb-fan who helped too). With your help I can now boot on usb 3. Awesome.

Only here I could realize a flash usb can wear out. The GPT vs MBR, etc. How to use grub-install --removable, etc.

I am actually using USB 3.1 gen 2 which is twice faster as USB 3.0 (10Gbps). .

What a revolution for me to use portable disks.
MagicPoulp
 
Posts: 292
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

Postby p.H » 2020-03-04 08:39

Head_on_a_Stick wrote:p.H has made a (very rare) mistake

Sorry for that, and thanks for pointing it. Of course I meant the opposite of what I wrote. Now fixed.

Deb-fan wrote:Bios were used in fairly recent systems too, newer versions have more capabilities, such as having gpt support

Err, no. BIOS does not need any GPT support.

Deb-fan wrote:LVM and btrfs filesystem(s) render partitioning irrelevant

Not always. In many cases you cannot allocate a whole disk to LVM or Btrfs so you still need partitions.

MagicPoulp wrote:It seems natural that the debian installer wil ltry to boot in the legacy mode to make sure it works on most machines.

You get it the wrong way. The Debian installer does not try to boot in either mode. The firmware does. The Debian installer can be booted either in BIOS/legacy or EFI mode but it is the firmware which chooses how and what it boots.
p.H
 
Posts: 1291
Joined: 2017-09-17 07:12

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable