You are not logged in.
Hi there,
I'd like to ask you if I am safe to remove a partition with the boot flag on. Output of several commands:
% sudo fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x759f9286
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 61442047 61440000 29.3G 83 Linux
/dev/sda2 122884094 976773119 853889026 407.2G 5 Extended
/dev/sda3 * 61442048 122882047 61440000 29.3G 83 Linux
/dev/sda5 184324096 956293119 771969024 368.1G 83 Linux
/dev/sda6 956295168 976773119 20477952 9.8G 82 Linux swap / Solaris
/dev/sda7 122886144 184322047 61435904 29.3G 83 Linux
Partition 2 does not start on physical sector boundary.
Partition table entries are not in disk order.
% df -h
Filesystem Size Used Avail Use% Mounted on
dev 3.9G 0 3.9G 0% /dev
run 3.9G 1.1M 3.9G 1% /run
/dev/sda1 29G 14G 15G 48% /
tmpfs 3.9G 11M 3.9G 1% /dev/shm
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 3.9G 5.7M 3.9G 1% /tmp
/dev/sda5 363G 203G 141G 60% /mnt/adatok
tmpfs 790M 16K 790M 1% /run/user/1000
% sudo parted --list
Model: ATA WDC WD5000LPVX-7 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 31.5GB 31.5GB primary ext4
3 31.5GB 62.9GB 31.5GB primary ext4 boot
2 62.9GB 500GB 437GB extended
7 62.9GB 94.4GB 31.5GB logical ext4
5 94.4GB 490GB 395GB logical ext4
6 490GB 500GB 10.5GB logical linux-swap(v1)
Additional info:
I have 3 GNU/Linux OS-es installed, namely:
sda1 holds my Arch install that I'm currently using.
sda3 is Debian, that has been there for the most time of the 3 OS-es
sda7 is a Manjaro install that refuses to boot.
sda5 is a big data partition and sda6 is swap.
The order which I used to install these OS-es: first Linux Mint on sda1, then Debian on sda3, then Manjaro on sda7, then replaced Linux Mint with Arch on sda1 (using os-prober) and now I feel that I don't really need Debian or Manjaro on this computer anymore. I guess this is the right order.
Still, the boot flag seems to be present on sda3 (Debian partition).
My OS-es are installed in Legacy mode using GRUB(2).
Can I safely remove those 2 partitions and not break my Arch install? If not, is there any other way I can do this? Thank you in advance.
I guess I ran the
grub-mkconfig -o /boot/grub/grub.cfg
command from Arch hoping it will move that boot flag but it seems it didn't.
EDIT: I fixed code brackets.
Last edited by Lemongrass (2017-06-06 15:03:31)
Offline
Yes you can, but some systems need a boot flag enabled otherwise you can get boot errors.
You can toggle a boot flag within fdisk using the "a" key, which then asks for the partition number to toggle - just "fdisk /dev/sda" and use "a" to toggle 3 off and same again to toggle 1 on, "p" to print and "w" to write.
You shouldn't have any problems, but if so just boot the install media from USB and fix. You might also want to reclaim the lost space from those unused partitions using something like gparted booted from USB.
Offline
...
Last edited by trytipARCH (2017-06-11 03:54:00)
Offline
Somewhat off-topic: trytip, you may want to use font-colors more sparringly - those colors can be very hard to read on some of the forum themes/skins. You can use [ code ] tags for commands and output.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline