# Extend Root Partition

**URL:** https://forums.suse.com/t/extend-root-partition/34686
**Category:** SLES Hardware
**Created:** [January 10, 2020, 10:53am UTC](https://forums.suse.com/t/extend-root-partition/34686 "2020-01-10T10:53:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Registration\_BAG](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@Registration\_BAG](https://forums.suse.com/u/Registration_BAG)
#### Post date: [January 10, 2020, 10:53am UTC](https://forums.suse.com/t/extend-root-partition/34686/1 "2020-01-10T10:53:29Z")

</div>

Hello,

iam not so deep in the Linux Commands and need some help. I’ve need to extend the Root Partition (sda5). It is extended Partition. Now i added 30GB to the extended Partition and i can see this as not assigned Space.

In Gparted i can’t allocate the free Space to sda5. What is my Mistake? How i can fix this?

![](https://i.ibb.co/pZpQ3DP/Gparted.png)

[https://ibb.co/zbwFSc5](https://ibb.co/zbwFSc5)

I hope somebody can help me.

---

<div class="post-metadata">

### Author: ![Andreas1](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Andreas1](https://forums.suse.com/u/Andreas1)
#### Post date: [January 11, 2020, 2:49pm UTC](https://forums.suse.com/t/extend-root-partition/34686/2 "2020-01-11T14:49:41Z")

</div>

Modern hardware supports GUID partion table (GPT).  
[https://en.wikipedia.org/wiki/GUID\_Partition\_Table](https://en.wikipedia.org/wiki/GUID_Partition_Table)

[https://de.wikipedia.org/wiki/GUID\_Partition\_Table](https://de.wikipedia.org/wiki/GUID_Partition_Table)

Your partition table is an old-style MS-DOS partition table (DOS).  
[https://en.wikipedia.org/wiki/Partition\_table](https://en.wikipedia.org/wiki/Partition_table)

[https://de.wikipedia.org/wiki/Partitionstabelle](https://de.wikipedia.org/wiki/Partitionstabelle)

You should replace your MS-DOS partition table by a GPT. You should activate for security reasons “UEFI Secure Boot” (which depends on GPT).  
[https://en.wikipedia.org/wiki/Unified\_Extensible\_Firmware\_Interface#Secure\_boot](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Secure_boot)

[https://de.wikipedia.org/wiki/Unified\_Extensible\_Firmware\_Interface#Secure\_Boot](https://de.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Secure_Boot)

Replace all ext2/ext3/ext4/reiserfs/btrfs partitions by xfs partitions.

Prepare a usb memory stick as a boot medium:  
[https://forums.suse.com/showthread.php?14228-Install-From-USB&p=58872#post58872](https://forums.suse.com/showthread.php?14228-Install-From-USB&p=58872#post58872)

English speaking peoples =\> Please translate with Deepl the german words:  
[https://www.deepl.com/translator](https://www.deepl.com/translator)

Take a full backup of your SSD:

[CODE]  
â¢ Von USB-Memorystick das SLED-Installations-DVD-Image starten mit der Taste .  
â¢ âRescue Systemâ wÃ¤hlen

Wenn beim Booten ab USB-Memorystick die grÃ¼ne LED des USB-Memorystick erlischt: (nur iStorage datashur Pro/Pro2)

Bei angeschlossenen USB-Memorystick den PIN-Code des USB-Memorystick erneut eingeben! (nur iStorage datashur Pro/Pro2)

```
â¢ Login ârootâ
â¢ # mkdir /usr/lib/microcode/root
â¢ # mkdir /usr/lib/microcode/home
â¢ # mkdir /usr/lib/microcode/backup

â¢ # mount /dev/sda1 /usr/lib/microcode/root
â¢ # umount /dev/sda1

â¢ # mount /dev/sda3 /usr/lib/microcode/home		
â¢ # umount /dev/sda3						
  
â¢ # mount /dev/sdc1 /usr/lib/microcode/backup
â¢ # umount /dev/sdc1

â¢ # mount
â¢ # df -h
â¢ # dmesg

â¢ # xfs_repair /dev/sda1
â¢ # xfs_repair /dev/sda3
â¢ # xfs_repair /dev/sdc1
â¢ # fsck.vfat -rvV /dev/sda2
  
â¢ # mount -r /dev/sda1 /usr/lib/microcode/root
â¢ # mount -r /dev/sda3 /usr/lib/microcode/home
â¢ # mount /dev/sdc1 /usr/lib/microcode/backup
â¢ # mount
â¢ # df -h
â¢ # rm /etc/mtab (nur SLED15 SP1)
â¢ # ln -s /proc/self/mounts /etc/mtab (nur SLED15 SP1)

```

VollstÃ¤ndiges Backup  
â¢ # xfsdump -l 0 -f /usr/lib/microcode/backup/Linux/\<Dateipfad und -name der Backupdatei\> /dev/sda1  
â¢ # xfsdump -l 0 -f /usr/lib/microcode/backup/Linux/\<Dateipfad und -name der Backupdatei\> /dev/sda3

```
â¢ # df -h
â¢ # umount /dev/sdc1
â¢ # umount /dev/sda1
â¢ # umount /dev/sda3		
â¢ # mount
â¢ # poweroff

```

Hinweis: â-lâ kleines âLâ von âLevelâ.[/CODE]

Erase the whole SSD with secure erase:

# [CODE]Anleitung Secure Erase auf Intel SSD

1.) Im BIOS das FestplattenverschlÃ¼sselungs-  
passwort entfernen (HP BIOS → DriveLock).

2.) Rechner mit dem Rescue System von der SLED-  
Installations-DVD starten.

3.) # hdparm -I /dev/sda

```
   -> Master password 
          supported
      not enabled
      not locked
      not frozen
      not expired: security count
          supported: enhanced erase

    Falls die Zeile "not frozen" fehlt und "frozen" in 
    der entsprechenden Zeile steht, muss die SSD geweckt
    werden:

      # echo -n mem > /sys/power/state
      Danach den Laptop aus dem Standby-Modus wecken. 
      Einfach mit der Power-Taste den Laptop wecken.

```

4.) # hdparm --user-master m --security-set-pass NULL /dev/sda  
 → Das neue, leere Master-Passwort der FestplattenverschlÃ¼sselung wird  
gesetzt.

5.) # hdparm --user-master u --security-set-pass NULL /dev/sda  
 → Das neue, leere Benutzer/User-Passwort der FestplattenverschlÃ¼sselung  
wird gesetzt.

6.) # hdparm --security-erase NULL /dev/sda

7.) # hdparm --security-erase-enhanced NULL /dev/sda  
 → Falls Schritt 7 nicht funktioniert, mÃ¼ssen die Schritte 4 bis 5  
wiederholt werden!

8.) # poweroff  
 → Rechner herunterfahren[/CODE]

and do a full restore:

```auto
Komplette Wiederherstellung
============================================================
    â¢ Von SLED-Installations-DVD starten mit der Taste <F9>.
    â¢ âRescue Systemâ wÃ¤hlen
    â¢ Login ârootâ
    â¢ Mit "cfdisk --zero" eine neue, leere GPT-Partitionstabelle erstellen.
    â¢ Mit cfdisk die Partitionstabelle erstellen:
      /dev/sda1 Linux root 12 GB
/dev/sda2 EFI-System 300 MB
/dev/sda3 Linux Home Restlicher Speicherplatz
/dev/sda4 Linux Swap RAM + 2 GB
      
    â¢ Wiederherzustellende Partition leeren:
# umount /dev/sda1
# umount /dev/sda3					
# mkfs.xfs -m crc=1 -fL root /dev/sda1
# mkfs.xfs -m crc=1 -fL home /dev/sda3		
# mkswap -c /dev/sda4 					
# mkfs.vfat -n EFI -f 2 -F 32 /dev/sda2

    â¢ Wiederherzustellende Partitionen kontrollieren:
      # mount /dev/sda1 /usr/lib/microcode/root
      # umount /dev/sda1

      # mount /dev/sda3 /usr/lib/microcode/home		
      # umount /dev/sda3

      # mount
      # df -h

# xfs_repair /dev/sda1
# xfs_repair /dev/sda3
# fsck.vfat -rvV /dev/sda2

    â¢ Wiederherzustellende Partitionen einhÃ¤ngen:
# mount /dev/sda1 /usr/lib/microcode/root
# mount /dev/sda3 /usr/lib/microcode/home		

    â¢ Backup-Partition einhÃ¤ngen
      # mount /dev/sdc1 /usr/lib/microcode/backup
      # umount /dev/sdc1
      
# mount
      # df -h
# dmesg
      
      # xfs_repair /dev/sdc1
# mount -r /dev/sdc1 /usr/lib/microcode/backup

    â¢ Restore-Vorgang starten:
# xfsrestore -f <Dateipfad und -name der Backupdatei> /usr/lib/microcode/root
# xfsrestore -f <Dateipfad und -name der Backupdatei> /usr/lib/microcode/home

    â¢ Wiederhergestellte Partitionen kontrollieren
# df -h
# ls -alh /usr/lib/microcode/root
# ls -alh /usr/lib/microcode/home

    â¢ Freier Speicherplatz auf der SSD als âfreiâ markieren (TRIM)
# fstrim -v /usr/lib/microcode/root
# fstrim -v /usr/lib/microcode/home
```

[CODE]  
Boot-Manager wiederherstellen  
=============================================================0  
â¢ Von SLED-Installations-DVD starten mit der Taste .  
â¢ âRescue Systemâ wÃ¤hlen  
â¢ Login ârootâ  
â¢ # mkdir /usr/lib/microcode/root

```
â¢ # mount /dev/sda1 /usr/lib/microcode/root
â¢ # umount /dev/sda1

â¢ # mount
â¢ # df -h
â¢ # dmesg
  
â¢ # xfs_repair /dev/sda1
â¢ # fsck.vfat -rvV /dev/sda2
â¢ # mount -o discard /dev/sda1 /usr/lib/microcode/root
â¢ # mount -o utf8 /dev/sda2 /usr/lib/microcode/root/boot/efi
â¢ # mount --bind /dev /usr/lib/microcode/root/dev/
â¢ # mount --bind /proc /usr/lib/microcode/root/proc/
â¢ # mount --bind /sys /usr/lib/microcode/root/sys/
â¢ # mount
â¢ # chroot /usr/lib/microcode/root
â¢ # vim /etc/fstab => fstab-EintrÃ¤ge kontrollieren und allenfalls anpassen
â¢ # yast2 

```

=\> Bootmanager auf “UEFI Secure Boot” umstellen.

```
â¢ # grub2-install /dev/sda
â¢ # grub2-mkconfig -o /boot/grub2/grub.cfg
â¢ # shim-install --config-file=/boot/grub2/grub.cfg
â¢ # exit (Verlassen der chroot-Umgebung)
â¢ # umount /usr/lib/microcode/root/dev
â¢ # umount /usr/lib/microcode/root/proc
â¢ # umount /usr/lib/microcode/root/sys
â¢ # umount /dev/sda1
â¢ # mount
â¢ # poweroff

â¢ SLED Installations-DVD entfernen und ab Festplatte starten.
â¢ Im YAST-Modul âBootloaderâ den Boot-Manager neu installieren. MenÃ¼-Wartezeit verÃ¤ndern (3 Sekunden auf 2 Sekunden und retour).

â¢ # efibootmgr	=> Bootreihenfolge kontrollieren
â¢ Computer herunterfahren. Und anschliessend neu starten.[/CODE]

```

For more informations see:  
[https://forums.suse.com/showthread.php?10300-SLES-11-SP2-Creating-bootable-image&p=40650#post40650](https://forums.suse.com/showthread.php?10300-SLES-11-SP2-Creating-bootable-image&p=40650#post40650)

[https://forums.suse.com/showthread.php?10294-about-partition&p=40594#post40594](https://forums.suse.com/showthread.php?10294-about-partition&p=40594#post40594)

[https://forums.suse.com/showthread.php?12403-SLES-11-SP3-recomendations-for-SSD-disk](https://forums.suse.com/showthread.php?12403-SLES-11-SP3-recomendations-for-SSD-disk)
