Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]merging /boot partition to root(/) precautions?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 283
Location: Canada

PostPosted: Sat Nov 08, 2014 10:33 pm    Post subject: [Solved]merging /boot partition to root(/) precautions? Reply with quote

My partition scheme had always been [boot][windows][gentoo][data]
But I've been thinking of merging boot with gentoo so I can have an extra partition to play with,
since MBR partition tables only allow you 4 partitions.
Is there any precautions to take while doing this?
This is what I'm going to do so far:
1. copy all of the data from /boot over to /boot inside root
2. delete /boot partition
3. change [/dev/sda3.gentoo] to [/dev/sda2.gentoo] and [/dev/sda4.data] to [/dev/sda3.data]
and removing [/dev/sda1.boot] in my /etc/fstab
4. enable a boot flag for / by # fdisk /dev/sda
5. do a # grub2-install /dev/sda (I am using grub2)
6. do a # grub2-mkconfig -o /boot/grub/grub.cfg

are there anymore precautions/actions I should take to make sure my system doesn't become unbootable? :?:


Last edited by ShanaXXII on Tue Nov 11, 2014 2:16 am; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Nov 08, 2014 10:43 pm    Post subject: Reply with quote

Deleting MBR partitions won't renumber existing ones. You should skip (most of) step 3.
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 283
Location: Canada

PostPosted: Sat Nov 08, 2014 10:45 pm    Post subject: Reply with quote

Ant P. wrote:
Deleting MBR partitions won't renumber existing ones. You should skip (most of) step 3.

Thanks for the guidance :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Sat Nov 08, 2014 10:50 pm    Post subject: Reply with quote

ShanaXXII,

You may have a lot more than 4 partitions.

The constraint is at most four Primary Partitions, one of which may be an Extended Partition.
An Extended Partition is a trick to reserve space. You do not use it directly.
After you have created the Extended Partition, you can create Logical Partitions 'inside' it.

Your existing partition numbers will not change. The Primary Partitions are numbered 1..4 from their location it the partition table.
Partition 1, your /boot will no longer be used. You should comment out its fstab entry and leave the rest of fstab unchanged.
There is no need to delete the boot partiton until after you have tested that it works. You may wish to
Code:
touch /boot/ItsBrokenIfISeeThis.
it the old /boot

Precautions ... keep some live media handy.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sat Nov 08, 2014 10:56 pm    Post subject: Reply with quote

You are not limited to 4 partitions. You are limited to 4 primary partitions. Someone very clever once though about this problem and came up with a solution: extended partitions. Another solution being LVM, but that is another question.

If you use an extended partition, you would designate one primary partition as extended and then you would be free to create basically as many partitions as you wanted. As far as Linux is concerned, there is no difference between primary and extended.

The LVM solution would have a separate /boot and possibly / with everything else in a LVM partition which can be divided into how ever many partitions you want. Again, the caveat being /boot can't be one of them. This solution has the advantage of being fully resizable as long as you don't use JFS or other fielsystems that are not shrinkable.

In either case, the easiest way to change your partition scheme would be to make backups, reparation, and restore your backup.

Quote:
are there anymore precautions/actions I should take to make sure my system doesn't become unbootable?
You have backups, right? :wink:

Mucking around with partition tables either goes perfectly or terribly wrong. There really is no middle ground.

EDIT: I see I wasn't quick enough with the post button. Neddy got there first.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Sat Nov 08, 2014 11:07 pm    Post subject: Reply with quote

The Doctor,

The original partition table was a dirty hack to allow MSDOS to use all of a HDD bigger than 32Mb ...( yep-MB)
The extended partition is a cludge on top of that original dirty hack so that MSDOS could use all oy HDD bigger than 128Mb, or four 32Mb partitions.

Aaah ... the joys of 16 bit segmented addressing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Nov 09, 2014 12:37 am    Post subject: Reply with quote

Ah Neddy! You bring me back to the days when I was the proud possessor of a whole 1 gigabyte hard drive. IIRC, it cost me $300.00
Back to top
View user's profile Send private message
roki942
Apprentice
Apprentice


Joined: 18 Apr 2005
Posts: 285
Location: Seattle

PostPosted: Sun Nov 09, 2014 8:58 am    Post subject: Reply with quote

Tony0945 wrote:
Ah Neddy! You bring me back to the days when I was the proud possessor of a whole 1 gigabyte hard drive. IIRC, it cost me $300.00
And you just brought me back to when I didn't have the $300 for a 10Mb hard drive :lol:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Sun Nov 09, 2014 9:14 am    Post subject: Reply with quote

Hard drives at $300 what luxury.

My first drive of any sort was a 144kB 5 1/4 floppy drive for an APPLE ][. It cost me £350.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
229566
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2010
Posts: 127

PostPosted: Sun Nov 09, 2014 9:32 am    Post subject: Reply with quote

Hey, I had an external 3.5" Double Density 720kb Floppy Drive for my ATARI STF 1040 ! I don't remember how much I paid for it :D

Back on topic, tho'. It's really amazing what kind of hacks from the past are still causing a mess today. MBR partition numbering, separte /usr .... (poke-poke :mrgreen: )
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Nov 09, 2014 10:03 pm    Post subject: Reply with quote

Quote:
My first drive of any sort was a 144kB 5 1/4 floppy drive for an APPLE ][. It cost me £350.

Had one of those at TRW that we used for data collection. Wrapped it in a plastic bag for some tests in Arizona. It came back with the bag half full of Arizona sand but were able to retrieve the data.

I still have a pair of 8 inch floppy drives that with case and controller cost me $1000 and the home brew S-100 that the controller card went into.

Do they have any value as antiques?

Never had an Apple. My daughter had a Commodore 64 and a Zx-80 (who made that again?). Went from S-100 to a Micron 486-100, which cost about $3000. A bit expensive because the high amount of memory, 16Meg. Still have that in the basement for sentiment. Once I had Caldera Linux on it.

Since then, I have not bought a desktop computer for myself. I prefer to build them from quality components instead of mass market junk.

Cheapest computer I ever built was back when I was unemployed. I found a dead Gateway P-100 tower at the curb by my sister's apartment. Took it home and cleaned it up with my middle grandson. He was around ten. We found a 14" monitor in a neighbor's garbage. He told us it worked but he had bought a 17". I bought a Tyan motherboard with an AMD k6-3+ 450Mhz that did overclock to 600 and populated with 256Meg on ebay for $30 which was my total out of pocket for the computer. I had an old serial mouse and AT keyboard. Put in an old IDE hard drive (P-150 had a working floppy) and RehAt with Gnome on it. I think it was RedHat 5.2 but could have been 7.1. David was thrilled to have his own computer and loved Gnome over Windows. I still have that computer running as a local server in the basement with an upgraded IDE drive (WD black 160G) and Gentoo of course. I build smaller packages natively but prepare binary packages on another machine for big stuff and the kernel.


EDIT: 8 inch not 14 inch of course. 14 inch was the size of hard drives in those days.


Last edited by Tony0945 on Mon Nov 10, 2014 10:53 am; edited 1 time in total
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Mon Nov 10, 2014 2:17 am    Post subject: Reply with quote

OK...
I have an 8-inch floppy stapled to my office wall, and I use an old 760MB SCSI 5.25" full-height drive as a doorstop.
I also have a small stack of Type-M keyboards for whenever the one I'm using fails.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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