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

 

 

 

Reuse reserved boot-partition

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
mabra
Posts: 110
Joined: 2010-10-16 16:53

Reuse reserved boot-partition

#1 Post by mabra »

Hallo !
I am on a debian box, which has four primary partitions.
The first patition ist just reserved - it contains the bootblock (bootsector)
only, while "/boot" is on other partitions.
While installations and repairs I need a small extra storage to provide some packages to use
from the installer and the space on the currently unused boot partition would be enough.
The boot partion is ext2, but I cannot mount it (bad superblock).
From my thinking: Just give that part a filesystem and all done.
Is this true, or will creating a filesystem on this partition change something else?

Thanks anyway,
Manfred

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Reuse reserved boot-partition

#2 Post by debiman »

does the boot process rely on the boot partition, or is it a leftover from some previous system configuration?

User avatar
mabra
Posts: 110
Joined: 2010-10-16 16:53

Re: Reuse reserved boot-partition

#3 Post by mabra »

Hi!

Thanks for the question.
Yes, it contains the boot-sector (and everything grub needs very early), but
"/boot" is on another partition, where one of the OS resides.

Regards,
Manfred

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Reuse reserved boot-partition

#4 Post by debiman »

so, "Yes, the boot process relies on the boot partition"? or not?
because if yes, i wouldn't mess with it.
how big is it?

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

Re: Reuse reserved boot-partition

#5 Post by Head_on_a_Stick »

Can we please see the full output of

Code: Select all

fdisk -l
Thanks!
deadbang

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

Re: Reuse reserved boot-partition

#6 Post by p.H »

mabra wrote:Yes, it contains the boot-sector (and everything grub needs very early), but
"/boot" is on another partition
What do you mean by "very early" ? GRUB PC is divided in 3 parts :
- boot image (in a boot sector)
- core image (in various locations but always on the same disk as the boot image)
- /boot/grub directory

AFAIK, the boot image is located in the same partition as the boot image in two cases :
- when the partition type supports embedding - btrfs does, ext* does not
- when the partition contains /boot/grub

Your set up does not seem to match any of these conditions.
Please clarify. The report from boot-info-script may be helpful.

User avatar
mabra
Posts: 110
Joined: 2010-10-16 16:53

Re: Reuse reserved boot-partition

#7 Post by mabra »

Hi !

Thanks you.
I do not know, what you mean with the boot-info-script ... my partition table follows:

Code: Select all

root@grid-rep:~# fdisk -l /dev/sdc
Disk /dev/sdc: 238.5 GiB, 256060514304 bytes, 500118192 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: 0xaf5f5d77

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdc1  *         2048   2047999   2045952  999M 83 Linux
/dev/sdc2         2048000  23019519  20971520   10G 83 Linux
/dev/sdc3        23019520 337592319 314572800  150G 83 Linux
/dev/sdc4       337594366 500118191 162523826 77.5G  5 Extended
/dev/sdc5       337594368 404703231  67108864   32G 82 Linux swap / Solaris
/dev/sdc6       404705280 500118191  95412912 45.5G 83 Linux
/dev/sdc1 is the partion, I am talking about.
This layout is due to the fact, that I have dual booting with an emergency
repair installation on /sdc2, while an installation having zfs on boot
is located on sdc3.
For my next installations, I will have the boot sector and the repair
installation on a separate disk, a HDD, becauase they dont have the
problems to become unbootable with power outages (which here
happens a lot).
At setup time with the debian installer, sdc1 is marked *boot, but
"dont use" - which explains, why it isnt formatted.

My question is only, what happens, If I format it!

Regards,
Manfred

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

Re: Reuse reserved boot-partition

#8 Post by p.H »

boot-info-script is a Debian package which installs the bootinfoscript script. It generates a report containing boot information.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Reuse reserved boot-partition

#9 Post by GarryRicketson »

My question is only, what happens, If I format it!
When you format a partition it over writes, or wipes all the data, and formats it, depending on how you actually format it. That partition will no longer boot, nor be bootable. You would have to install a new mbr to make it bootable.
There is much more details available if one does a search.
what happens when you format a partition
All though you do say this is a multi boot system, and based on what you say, the 2nd
partition might still be bootable, you might need to flag it as bootable, like the 1st one is.
A lot depends on what bootloader you are using, where it is installed, and you conveniently do not tell us that.

Is there some reason you don't just make a good back up of the entire drive (disk) before doing anything ?
Or you can also make a backup copy of the partition, that way if you format it, and it effects the other partitions, you can restore it.
If you don't believe me, or also I might just be wrong, go ahead and try it, but make a good backup first, that way you don't have to worry about it. If you are using Grub or Grub2 it depends a lot on where you have that installed, other bootloaders as well.

User avatar
mabra
Posts: 110
Joined: 2010-10-16 16:53

Re: Reuse reserved boot-partition

#10 Post by mabra »

Hello!

I've just done it.
mkfs ....
It modifies nothing else and the box is working usind the new partion (Have booted to test).

Regards,
Manfred

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Reuse reserved boot-partition

#11 Post by GarryRicketson »

Well, that is good, glad it worked out.

Post Reply