Reuse reserved boot-partition

Kernels & Hardware, configuring network, installing services

Reuse reserved boot-partition

Postby mabra » 2018-09-22 20:00

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
mabra
 
Posts: 89
Joined: 2010-10-16 16:53

Re: Reuse reserved boot-partition

Postby debiman » 2018-09-23 06:29

does the boot process rely on the boot partition, or is it a leftover from some previous system configuration?
User avatar
debiman
 
Posts: 2927
Joined: 2013-03-12 07:18

Re: Reuse reserved boot-partition

Postby mabra » 2018-09-23 08:00

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
mabra
 
Posts: 89
Joined: 2010-10-16 16:53

Re: Reuse reserved boot-partition

Postby debiman » 2018-09-24 03:44

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
debiman
 
Posts: 2927
Joined: 2013-03-12 07:18

Re: Reuse reserved boot-partition

Postby Head_on_a_Stick » 2018-09-24 05:10

Can we please see the full output of
Code: Select all
fdisk -l

Thanks!
User avatar
Head_on_a_Stick
 
Posts: 8013
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Reuse reserved boot-partition

Postby p.H » 2018-09-24 10:26

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.
p.H
 
Posts: 602
Joined: 2017-09-17 07:12

Re: Reuse reserved boot-partition

Postby mabra » 2018-09-25 02:34

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
User avatar
mabra
 
Posts: 89
Joined: 2010-10-16 16:53

Re: Reuse reserved boot-partition

Postby p.H » 2018-09-25 07:04

boot-info-script is a Debian package which installs the bootinfoscript script. It generates a report containing boot information.
p.H
 
Posts: 602
Joined: 2017-09-17 07:12

Re: Reuse reserved boot-partition

Postby GarryRicketson » 2018-09-25 07:44

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
GarryRicketson
 
Posts: 5134
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Reuse reserved boot-partition

Postby mabra » 2018-09-27 23:01

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
mabra
 
Posts: 89
Joined: 2010-10-16 16:53

Re: Reuse reserved boot-partition

Postby GarryRicketson » 2018-09-28 00:57

Well, that is good, glad it worked out.
User avatar
GarryRicketson
 
Posts: 5134
Joined: 2015-01-20 22:16
Location: Durango, Mexico


Return to System configuration

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable