View previous topic :: View next topic |
Author |
Message |
fagus n00b
Joined: 27 Jan 2017 Posts: 5
|
Posted: Mon Jan 30, 2017 7:42 am Post subject: partition MBR/GPT fdisk question |
|
|
hello
I have tried 3 times to install gentoo using GPT for partitioning but I always got stuck in the end (command grub-install /dev/sda hangs forever).
I was thinking to try partitioning with fdisk next time. But the handbook (part 1 - installing - amd64) is not clear for me. In the section "Alternative: Using fdisk to partition the disk" in "Creating the BIOS boot partition" there is written: "Mark the partition for UEFI purposes". But then in the note that follow this is discouraged. My question is: do I have to mark the partition for UEFI purposes or not?
(The problem is also that I don't know wether my motherboard is UEFI capable. I've been searching the internet but I cant 't figure it out. My BIOS never mentions UEFI though.)
I have a DELL studio 1735 with a SSD 250G hardrive. The BIOS version is BIOS revision A04. It came installed with windows vista but I' ve been using different Ubuntu releases in the last years.
Can someone help me with this. (After 3 trials installing gentoo I 'm getting a little bit discouraged ....)
Thanks a lot!
fagus |
|
Back to top |
|
|
fturco Veteran
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Mon Jan 30, 2017 8:39 am Post subject: |
|
|
I'm quite sure your system is a BIOS one, not UEFI. According to the Dell Studio 1735 support page you have BIOS update options as well. |
|
Back to top |
|
|
fagus n00b
Joined: 27 Jan 2017 Posts: 5
|
Posted: Mon Jan 30, 2017 9:57 am Post subject: |
|
|
Okay thanks!
But do I have to mark the partition for UEFI purposes or not? I don 't wanna do anything wrong since my previous trials to install gentoo all went wrong ...
fagus |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Mon Jan 30, 2017 11:24 am Post subject: |
|
|
fagus, if I understand you correctly, you want to use PC BIOS with a GPT HDD? In that case, you need to create a 1MiB unformatted partition before the other partitions, and set the bios_grub flag (code EF02) for that 1 MiB partition. See the first partition /dev/sda1 in the example below.
Code: | $ sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.8
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): B13A26FA-A79D-470A-C73B-3047CA923D0C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2925 sectors (1.4 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02
2 4096 33558527 16.0 GiB FD00 SWAP1
3 33558528 436211711 192.0 GiB FD00 ROOT1
4 436211712 5860532223 2.5 TiB FD00 CLOUD1 |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
fagus n00b
Joined: 27 Jan 2017 Posts: 5
|
Posted: Tue Jan 31, 2017 4:42 am Post subject: |
|
|
ok thanks a lot. I 'll try this |
|
Back to top |
|
|
ChrisJumper Advocate
Joined: 12 Mar 2005 Posts: 2390 Location: Germany
|
Posted: Wed Feb 01, 2017 2:02 pm Post subject: |
|
|
Hi,
i join this Thread because i have exactly the same issue/question. With large hard drive you have to use a GPT-Partition Table these days and the Handbook still require to use a ext2 /boot Partition.
And that point did not describe clearly if the partition type from fdisk is synonymous with the GPT-Code.
Did i need three partitions? One Biosefi (for grub2 and efi?) and one EF00 for my /boot Partition?
The issue that i have with this, is that normally i have to formate the partition and the CODE or Type describe which formate was use. In addition this code seems to work like the regular boot-flag from fdisk? Or is that boot-flag obsolete with the new GPT Tables?
I have a strong anxiety to set the /boot code to 8300 (Linux System), because it got an ext2 formatted file system and this documentation say it should be EF00.
What exactly is the requirement for the grub-installer script to use that small partition at the beginning and what is the requirement for efi Systems to boot?
Edit: Ok, my System boot with the EF00 as /boot. The first Partition has EF02. But i am still not sure if this is right. Could i drop the second EF00 on /boot and use 8300 instead?
Regards
Chris |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Wed Feb 01, 2017 2:43 pm Post subject: |
|
|
ChrisJumper,
BIOS Booting
You can have a GPT or an MSDOS partition table. However ... A few broken BIOSes will not boot from a GPT formatted drive because they check the partition type in the 'Protective' MSDOS partition table.
Its 0xEE to indicate that GPT is in use. That's game over[1].
Many more BIOSes check the boot flag in the partition table. We are talking BIOS here, BIOS knows nothing of GPT, so it looks in the 'Protective' MSDOS partition table.
Its here you need to set the boot flag if your are using BIOS and GPT.
When you install grub, it needs some space outside of the filesystem for a piece of itself. With MSDOS partition tables (but not GPT) there is some free space before the first partition.
Grub usus this free space.
A separate /boot partition is not required.
[1] There is a hack for advanced format drives to use MSDOS partition tables to cover more than the conventional 2Tb but don't go there.
UEFI Booting
UEFI and GPT just works. The GPT partition table starts in LBA 1 (and there is a copy at the end of the volume), so there is no unused space before the first partition for grub to use.
It still needs some space for itself, hence the 2Mb unformatted partition.
You must have a fat32 partition because that's the only filesystem that UEFI firmware can read and for lots of reasons, you can't install Linux on a FAT filesystem.
Hence requirement for a separate /boot.
The file system names and descriptions in the GPT partition table are just for you.
What matters, are the flags and to a lesser extent, the IDs. Most, but not all, IDs are ignored so best get them right. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
fagus n00b
Joined: 27 Jan 2017 Posts: 5
|
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Wed Feb 01, 2017 9:45 pm Post subject: |
|
|
fagus,
When you do give it another go, if you're struggling to partition the drive from the command line I recommend you try the GUI tool GParted on SystemRescueCd. It's easier because you will have a visual representation of the partitions, and pop-up windows to view and change settings. Although I sometimes use the command line to partition and format drives, I like an easy life and so use GParted most of the time. Also, the comments below might be of some help.
ChrisJumper,
If you're talking about using a GPT HDD with a machine using PC BIOS, below are three (of many) possible partitioning schemes:
Scheme 1
1 MiB of unpartitioned space before /dev/sda1. *
/dev/sda1 unformatted 1 MiB partition, Code EF02, with the bios_grub flag set. **
/dev/sda2 ext2 partition, Code 8300, boot flag not set, which will contain /boot.
/dev/sda3 ext4 partition, Code 8300, which will contain / (root).
/dev/sda4 ext4 partition, Code 8300, which will contain /home.
/dev/sda5 linuxswap partition, Code 8200.
Scheme 2
1 MiB of unpartitioned space before /dev/sda1. *
/dev/sda1 unformatted 1 MiB partition, Code EF02, with the bios_grub flag set. **
/dev/sda2 ext4 partition, Code 8300, boot flag not set, which will contain / (root) and /boot.
/dev/sda3 ext4 partition, Code 8300, which will contain /home.
/dev/sda4 linuxswap partition, Code 8200.
Scheme 3
1 MiB of unpartitioned space before /dev/sda1. *
/dev/sda1 unformatted 1 MiB partition, Code EF02, with the bios_grub flag set. **
/dev/sda2 ext4 partition, Code 8300, boot flag not set, which will contain / (root) and /boot and /home.
/dev/sda3 linuxswap partition, code 8200.
* If you use GParted on SystemRescueCd to partition and format the HDD, GParted will normally leave 1 MiB of empty space before the first partition (/dev/sda1) in any case.
** The partition can be formatted if desired, but it is not necessary to do so.
Regarding your question about using Code 8300 instead of Code EF00 for the partition on which /boot resides -- be it on its own partition or on the same partition as / (root) -- you can use Code 8300. You can see this in the example below (uses Scheme 1 above):
Code: | # fdisk -l /dev/sda
Disk /dev/sda: 36 GiB, 38654705664 bytes, 75497472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E1A118BD-3C8D-4331-8C2F-BCBA4B16A660
Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 1052671 1048576 512M Linux filesystem
/dev/sda3 1052672 42995711 41943040 20G Linux filesystem
/dev/sda4 42995712 63967231 20971520 10G Linux filesystem
/dev/sda5 63967232 75495423 11528192 5.5G Linux swap
# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 75497472 sectors, 36.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E1A118BD-3C8D-4331-8C2F-BCBA4B16A660
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 75497438
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02
2 4096 1052671 512.0 MiB 8300 /boot
3 1052672 42995711 20.0 GiB 8300 /
4 42995712 63967231 10.0 GiB 8300 /home
5 63967232 75495423 5.5 GiB 8200
# blkid
/dev/sda3: UUID="8cbac366-2794-45ca-b92e-bbbf3a34ca3e" TYPE="ext4" PARTLABEL="/" PARTUUID="46a5fd0f-abdb-4e58-aa1c-f6b997f3839c"
/dev/sda1: PARTUUID="9108be00-67b5-4fad-9eaa-71581abc36af"
/dev/sda2: UUID="9484d7f2-906e-4e31-9899-6ef157695c98" TYPE="ext2" PARTLABEL="/boot" PARTUUID="c4ebecfa-a41a-4d72-b3ce-83af81a426cb"
/dev/sda4: UUID="00c19787-8955-40d7-bb64-9e3f51c9cd5a" TYPE="ext4" PARTLABEL="/home" PARTUUID="b485acef-3161-48ca-a39d-bcc3cab33e59"
/dev/sda5: UUID="91b61f58-4af5-4e28-aa6d-30f91c107c6c" TYPE="swap" PARTUUID="e9ac2da5-984c-4c22-bd51-a744d4e3a9f0" |
I usually prefer to keep /boot, / (root) and /home on different partitions to each other, but it's not obligatory. (Actually, I usually put the swap partition before the / (root) and /home partitions because I prefer to specify the precise sizes of the swap and / (root) partitions and then fill the remainder of the HDD with the /home partition, but that's a different topic.)
See https://www.gnu.org/software/grub/manual/html_node/BIOS-installation.html
GNU GRUB Manual - 3.4 BIOS installation wrote: | Some newer systems use the GUID Partition Table (GPT) format. This was specified as part of the Extensible Firmware Interface (EFI), but it can also be used on BIOS platforms if system software supports it; for example, GRUB and GNU/Linux can be used in this configuration. With this format, it is possible to reserve a whole partition for GRUB, called the BIOS Boot Partition. GRUB can then be embedded into that partition without the risk of being overwritten by other software and without being contained in a filesystem which might move its blocks around.
When creating a BIOS Boot Partition on a GPT system, you should make sure that it is at least 31 KiB in size. (GPT-formatted disks are not usually particularly small, so we recommend that you make it larger than the bare minimum, such as 1 MiB, to allow plenty of room for growth.) You must also make sure that it has the proper partition type. Using GNU Parted, you can set this using a command such as the following:
# parted /dev/disk set partition-number bios_grub on
If you are using gdisk, set the partition type to '0xEF02'. With partitioning programs that require setting the GUID directly, it should be '21686148-6449-6e6f-744e656564454649'.
Caution: Be very careful which partition you select! When GRUB finds a BIOS Boot Partition during installation, it will automatically overwrite part of it. Make sure that the partition does not contain any other data. |
The following diagram in Wikipedia article BIOS boot partition might be of help:
https://upload.wikimedia.org/wikipedia/commons/4/45/GNU_GRUB_components.svg
Note that Example 2 in that diagram assumes the PC uses UEFI, hence the FAT32 partition. As you can see in the console output above, a FAT partition is not required if the PC uses PC BIOS.
If you look at the console output above and Example 2 in the above-mentioned Wikipedia diagram, you can see there is empty space before the first partition. In the console output the 1 MiB partition /dev/sda1 starts at Sector 2048, i.e. there is 1 MiB of unpartitioned disk space prior to the unformatted /dev/sda1 bios_grub partition. That initial space corresponds to the space shown in orange on the Wikipedia diagram Example 2. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
ChrisJumper Advocate
Joined: 12 Mar 2005 Posts: 2390 Location: Germany
|
Posted: Fri Feb 03, 2017 1:23 am Post subject: |
|
|
Thank you very much Fitzcarraldo and NeddySeagoon.
I had three days of stress, because of the mix of systemd, GPT and that my kernel did not work with standard "any?" Framebuffer. Had a Intel 7 Genration Chip here and often after the Decompressing Linux Kernel, the whole Boot process freeze. (Now i got all Working..)
The UEFI Method is just for mainboards that did not support the lagacy "Bios" Boot Mode isn't it?
I am sure i have an Uefi Bios with nice graphics, mouse and secure boot.. and the boot iself works without kernel Efi support. And i have no Fat 32 Partition, because the 1 or 2 MB (yes now i know that dont need a formatation), throw an error and mkfs.vfat -F 32 say: not enough cylinders...
@fagus
Sometimes a Break is good and came back later with fresh ideas. I am not sure, but i think you mixed up the mount of /dev, /proc and /sys before chroot? Or have you the drives in your /etc/fstab?
Because i am naive and think that the grub-install Script just hang at your installation because it need some time to collect the device Informations.
Did you created a Symlink for that?
Code: | root # ln -sf /proc/self/mounts /etc/mtab |
Quote: | /etc/mtab
Upstream only supports the /etc/mtab file being a symlink to /proc/self/mounts. Not creating this symlink will also cause problems with mount (bug #434090) and df (bug #477240). In the past some utilities wrote information (like mount options) into /etc/mtab and thus it was supposed to be a regular file. Nowadays all software is supposed to avoid this problem. Still, before switching the file to become a symbolic link, please check bug #477498 to be sure that the system is not affected by any reported regressions. |
By the Way, my Partition:
Code: | # gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 7814037168 sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): #PRIVATE_INFORMATION#
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7814037134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3693 sectors (1.8 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 10239 4.0 MiB EF02
2 10240 272383 128.0 MiB 8300
3 272384 2369535 1024.0 MiB 8200
4 2369536 7814035455 3.6 TiB 8300 |
Good Luck the next time! |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Feb 03, 2017 2:56 am Post subject: |
|
|
ChrisJumper wrote: | Now i got all Working.. |
That's good news.
ChrisJumper wrote: | The UEFI Method is just for mainboards that did not support the lagacy "Bios" Boot Mode isn't it? |
Some motherboards have support for both PC BIOS and UEFI, and you can configure them at boot to use one or the other (press F2 or whatever to enter Setup). For example the firmware in my Clevo W230SS laptop provides a choice of UEFI or PC BIOS, and I chose to configure it to use PC BIOS, but I could equally have chosen to configure it to use UEFI instead. I don't know for how long PC manufacturers will continue releasing new models that support PC BIOS as well as UEFI; I expect they will drop PC BIOS at some point and just supply machines with UEFI. Perhaps some PC manufacturers are already doing that (I personally have not yet come across a machine that supports only UEFI).
ChrisJumper wrote: | And i have no Fat 32 Partition, because the 1 or 2 MB (yes now i know that dont need a formatation), throw an error and mkfs.vfat -F 32 say: not enough cylinders... |
That is because you did not allocate enough space for the ESP (EFI System Partition). Notice in Example 2 on the Wikipedia diagram that the ESP is shown as '~99 MiB'. Notice in the Gentoo Installation Guide that the ESP is shown as '128 MB'.
Gentoo Handbook:AMD64 | Installation wrote: | Using UEFI
When installing Gentoo on a system that uses UEFI to boot the operating system (instead of BIOS), then it is important that an EFI System Partition (ESP) is created. The instructions for parted below contain the necessary pointers to correctly handle this operation.
The ESP must be a FAT variant (sometimes shown as vfat on Linux systems). The official UEFI specification denotes FAT12, 16, or 32 filesystems will be recognized by the UEFI firmware, although FAT32 is recommended for the ESP. Proceed in formatting the ESP as FAT32:
Code: | root # mkfs.fat -F 32 /dev/sda2 |
Important
If a FAT variant is not used for the ESP, the system's UEFI firmware is not guaranteed to find the bootloader (or Linux kernel) and most likely be unable to boot the system! |
From the console output you posted, it looks like you are booting a GPT HDD using PC BIOS, which is what I thought you were trying to achieve. That's how I configured my server (4 x 3TB HDDs), as it does not have UEFI firmware, only PC BIOS.
If you have a PC that uses UEFI -- or a PC that allows the choice of PC BIOS or UEFI and you select the latter -- you can simplify the GPT partitioning scheme:
1 MiB of unpartitioned space before /dev/sda1.
/dev/sda1 fat32 partition of e.g. 512 MiB, Code EF00, with the boot and efi flags set, which will contain /boot/efi.
/dev/sda2 linuxswap partition, Code 8200.
/dev/sda3 ext4 partition, Code 8300, which will contain / (root) and /boot and /boot/grub.
/dev/sda4 ext4 partition, Code 8300, which will contain /home.
1 MiB of unpartitioned space after /dev/sda4.
As the PC is not using PC BIOS, there is no need for a BIOS Boot partition (Code EF02). The 1MiB of unpartitioned space at the start of the HDD before /dev/sda1 is still required, though.
(The order of the swap, / (root) and /home partitions can be changed as you choose.)
This results in:
Code: | # gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 134217728 sectors, 64.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 54B3C38F-1C55-4A19-9BAA-499C4D0D8DD0
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 134217694
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1050623 512.0 MiB EF00
2 1050624 5244927 2.0 GiB 8200
3 5244928 72353791 32.0 GiB 8300
4 72353792 134215679 29.5 GiB 8300
# fdisk -l /dev/sda
Disk /dev/sda: 64 GiB, 68719476736 bytes, 134217728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 54B3C38F-1C55-4A19-9BAA-499C4D0D8DD0
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 5244927 4194304 2G Linux swap
/dev/sda3 5244928 72353791 67108864 32G Linux filesystem
/dev/sda4 72353792 134215679 61861888 29.5G Linux filesystem
# parted -l
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 68.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 boot, esp
2 538MB 2685MB 2147MB linux-swap(v1)
3 2685MB 37.0GB 34.4GB ext4
4 37.0GB 68.7GB 31.7GB ext4
# blkid
/dev/sda3: LABEL="ROOT" UUID="fdf2b11a-8c6b-4bb3-9534-477c3ed49d95" TYPE="ext4" PARTUUID="f393129f-ab32-40fb-bf78-3aead3dd4af0"
/dev/sda1: UUID="C024-8A30" TYPE="vfat" PARTUUID="d941f728-c386-4f4c-b0c3-aa76f4290774"
/dev/sda2: LABEL="SWAP" UUID="1f752a05-a1fb-4c5f-ab2e-079715207b4d" TYPE="swap" PARTUUID="a4daec88-da44-4ae3-8119-01cc81325f03"
/dev/sda4: LABEL="HOME" UUID="041e4ab2-d54c-4092-b445-779997ac09ce" TYPE="ext4" PARTUUID="7e1b8dc0-2f38-4260-95af-fbb80bb72156" |
Alternatively, if you want a UEFI/GPT installation with /boot and /boot/grub on a separate partition (/boot/efi has to stay on /dev/sda1), then the following scheme is also possible:
1 MiB of unpartitioned space before /dev/sda1.
/dev/sda1 fat32 partition of e.g. 512 MiB, Code EF00, with the boot and efi flags set, which will contain /boot/efi.
/dev/sda2 linuxswap partition, Code 8200.
/dev/sda3 ext2 partition, Code 8300, which will contain /boot and /boot/grub.
/dev/sda4 ext4 partition, Code 8300, which will contain / (root).
/dev/sda5 ext4 partition, Code 8300, which will contain /home.
1 MiB of unpartitioned space after /dev/sda5.
The above looks like the following:
Code: | # gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 134217728 sectors, 64.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 54B3C38F-1C55-4A19-9BAA-499C4D0D8DD0
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 134217694
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1050623 512.0 MiB EF00
2 1050624 5244927 2.0 GiB 8200
3 5244928 6293503 512.0 MiB 8300
4 6293504 72353791 31.5 GiB 8300
5 72353792 134215679 29.5 GiB 8300
# fdisk -l /dev/sda
Disk /dev/sda: 64 GiB, 68719476736 bytes, 134217728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 54B3C38F-1C55-4A19-9BAA-499C4D0D8DD0
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 5244927 4194304 2G Linux swap
/dev/sda3 5244928 6293503 1048576 512M Linux filesystem
/dev/sda4 6293504 72353791 66060288 31.5G Linux filesystem
/dev/sda5 72353792 134215679 61861888 29.5G Linux filesystem
# parted -l
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 68.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 boot, esp
2 538MB 2685MB 2147MB linux-swap(v1)
3 2685MB 3222MB 537MB ext2
4 3222MB 37.0GB 33.8GB ext4
5 37.0GB 68.7GB 31.7GB ext4
# blkid
/dev/sda4: LABEL="ROOT" UUID="174ac3e8-f105-4606-bed1-7a1aa22c3631" TYPE="ext4" PARTUUID="01d9c139-fe70-415a-abc6-2351fad33384"
/dev/sda1: UUID="B4C1-7EA5" TYPE="vfat" PARTUUID="d941f728-c386-4f4c-b0c3-aa76f4290774"
/dev/sda2: LABEL="SWAP" UUID="e3ddf9b5-2ae3-4469-a121-0a1a78aa6702" TYPE="swap" PARTUUID="a4daec88-da44-4ae3-8119-01cc81325f03"
/dev/sda3: LABEL="BOOT" UUID="1e24ea9d-5358-4e9b-8667-d7a42e7b6ad7" TYPE="ext2" PARTUUID="b5369ce3-4b44-4d19-be6f-1d226dc71cb3"
/dev/sda5: LABEL="HOME" UUID="87f6a0af-dbed-4587-b810-efca8f269618" TYPE="ext4" PARTUUID="19fd7d00-2d89-4653-af03-e81618a3b70d" |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
dylanmc Apprentice
Joined: 18 Apr 2014 Posts: 157 Location: Modena, Italy
|
Posted: Wed Jan 03, 2018 9:34 pm Post subject: |
|
|
Hi to all, I have to convert my partition table from MBR to GPT ..
Code: | snoopx /home/luca # fdisk /dev/sda
Welcome to fdisk (util-linux 2.30.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Comando (m per richiamare la guida): p
Disk /dev/sda: 232,9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1cac810d
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sda1 2048 206847 204800 100M 83 Linux
/dev/sda2 206848 4302847 4096000 2G 82 Linux swap / Solaris
/dev/sda3 4302848 488397167 484094320 230,9G 83 Linux
|
And this is
Code: | snoopx /home/luca # gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.
Command (? for help):
|
Is impossible and I have to re-install my gentoo? |
|
Back to top |
|
|
grumblebear Apprentice
Joined: 26 Feb 2008 Posts: 202
|
Posted: Thu Jan 04, 2018 1:34 am Post subject: |
|
|
Just do as advised. I think gparted (started from a rescue cd) would safely do the resize and convert the partition table. |
|
Back to top |
|
|
dylanmc Apprentice
Joined: 18 Apr 2014 Posts: 157 Location: Modena, Italy
|
Posted: Thu Jan 04, 2018 10:03 am Post subject: |
|
|
I have fear to destroy my installation... |
|
Back to top |
|
|
grumblebear Apprentice
Joined: 26 Feb 2008 Posts: 202
|
Posted: Thu Jan 04, 2018 10:44 am Post subject: |
|
|
The resize/conversion will usually do no harm. The tricky thing is to get your bootloader configuration right afterwards. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|