Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

why does debian isntaller add extended partition

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

why does debian isntaller add extended partition

#1 Post by MagicPoulp »

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

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: why does debian isntaller add extended partition

#2 Post by Deb-fan »

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.
Most powerful FREE tech-support tool on the planet * HERE. *

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: why does debian isntaller add extended partition

#3 Post by p.H »

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.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

#4 Post by MagicPoulp »

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).

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: why does debian isntaller add extended partition

#5 Post by p.H »

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.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

#6 Post by MagicPoulp »

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,"

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: why does debian isntaller add extended partition

#7 Post by Deb-fan »

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.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: why does debian isntaller add extended partition

#8 Post by Head_on_a_Stick »

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.
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: why does debian isntaller add extended partition

#9 Post by Deb-fan »

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. :)
Most powerful FREE tech-support tool on the planet * HERE. *

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

#10 Post by MagicPoulp »

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".

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: why does debian isntaller add extended partition

#11 Post by Deb-fan »

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
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: why does debian isntaller add extended partition

#12 Post by Head_on_a_Stick »

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.
deadbang

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

#13 Post by MagicPoulp »

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: 431
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

#14 Post by MagicPoulp »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: why does debian isntaller add extended partition

#15 Post by p.H »

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
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: why does debian isntaller add extended partition

#16 Post by p.H »

Head_on_a_Stick wrote:I've just tried booting the installer in UEFI mode with an MS-DOS partition table and it shows this message
Is it only because of the DOS partition table or because the installer found an operating system installed for BIOS/legacy boot (as the message suggests) ? Does this message happen with an empty DOS partition table ?
MagicPoulp wrote:there was a power issue on SSD drives of the same manufacturer in kernel 4.10
This issue affects only internal NVMe SSDs, not SATA or USB SSDs.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

#17 Post by MagicPoulp »

Perhaps my firmware booted the installer in legacy mode even though CSM full support is disabled in the bios. When reading in the bios it says enabled will reach full support, but it does not mean that disable will block any attempt to boot in legacy mode. Not sure here. But the bios saying CSM enable or disabled should mean if one boots in legacy mode or not.

Or perhaps it is when I reinstalled grub in debian rescue mode that it changed things.
grub-install --removable
grub-update

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: why does debian isntaller add extended partition

#18 Post by p.H »

It seems that CSM is not exactly the same as legacy boot. It can be an option of EFI boot. For example, I read that Windows Vista/7 requires CSM when set up for EFI boot. And it's not legacy boot with DOS partitioning and MBR, it's real EFI boot with GPT partitioning and EFI system partition.

Installing GRUB does not change the BIOS/UEFI firmware settings, only EFI boot entries shown by efibootmgr (if installing GRUB for EFI).

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: why does debian isntaller add extended partition

#19 Post by MagicPoulp »

Then why did the non advanced debian installer install partitions by default with MBR when CSM is disabled in the bios?

People said that EFI boot will result in GPT.

Perhaps the detection of Windows on the hard drive affected the installer, even though I was installing on USB.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: why does debian isntaller add extended partition

#20 Post by p.H »

MagicPoulp wrote:Then why did the non advanced debian installer install partitions by default with MBR when CSM is disabled in the bios?
Possible reasons :
- Disabling CSM does not disable BIOS/legacy boot but only legacy support in EFI mode, and the installer booted in BIOS/legacy mode.
- You picked manual partitioning and did not ask to create a new partition table. The installer may create a new partition table only with guided partitioning using a whole disk.
MagicPoulp wrote:Perhaps the detection of Windows on the hard drive affected the installer, even though I was installing on USB.
Is Windows or any installed OS set up for EFI or BIOS/legacy boot ?
If set up for BIOS boot, did you see the screen shown by Head_on_a_Stick and did you answer "no", switching the installer to BIOS/legacy mode ?

Post Reply