Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2 /boot partitions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 34
Location: 38.7789° N, 90.6031° W

PostPosted: Sun May 17, 2015 3:14 pm    Post subject: 2 /boot partitions Reply with quote

I'm guessing Gentoo made a second /boot directory in the / directory somewhere along me compiling. I'm having trouble getting grub to configure right because I have a /boot partition and a /boot directory. Should I just reinstall Gentoo and not use a /boot partition?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun May 17, 2015 4:17 pm    Post subject: Reply with quote

steveo314,

The /boot directory is a mount point for the boot partition.

The Linux filesystem appears as a single tree structure, mounted at / (root)
Directories serve to attach other partitions, or more generally, filesystems to the tree.

You should attach your boot partition to /boot before you do anything with it.
When the partition is not mounted /boot should be empty.

Its not an error to Gentoo if you forget to mount boot on /boot before you use it.
Files you install there will install correctly but its the wrong place.
_________________
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
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 34
Location: 38.7789° N, 90.6031° W

PostPosted: Sun May 17, 2015 4:40 pm    Post subject: Reply with quote

Right. I followed the Gentoo install wiki step by step. Sometime after I got the base setup the /boot directory was added to the / directory. I'm guessing it was an error in my doing.

Grub2 boots from the /boot partition. Would I be able to move the contents of /'s /boot to a temp directory, delete /'s /boot, move the temp contents to the /boot partition and the kernel files I moved still be okay?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sun May 17, 2015 4:52 pm    Post subject: Reply with quote

yes but
move the contents of /'s /boot to a temp directory, delete /'s /boot, mount the boot partition to the /boot directory, move the temp contents to the /boot directory (partition) {for clarity}
_________________
Defund the FCC.
Back to top
View user's profile Send private message
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 34
Location: 38.7789° N, 90.6031° W

PostPosted: Sun May 17, 2015 5:05 pm    Post subject: Reply with quote

Ok, I figured I could do it that way but I didn't know if would affect the kernel and grub
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun May 17, 2015 5:15 pm    Post subject: Reply with quote

steveo314,

/s /boot should be empty unless the boot partition is mounted there.
You can abandon the boot partition if you want to but its far easier to remove the noauto option from the /boot entry in /etc/fstab so /boot is always mounted.
_________________
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
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 34
Location: 38.7789° N, 90.6031° W

PostPosted: Sun May 17, 2015 6:03 pm    Post subject: Reply with quote

I need to do that, NeddySeagoon.
Back to top
View user's profile Send private message
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 34
Location: 38.7789° N, 90.6031° W

PostPosted: Tue May 19, 2015 7:01 pm    Post subject: Reply with quote

I found out what messed me up. The stage3 tarball has a /boot folder in it.

So after install you 2 /boot directories.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue May 19, 2015 7:22 pm    Post subject: Reply with quote

steveo314,

Err not quite.

The /boot directory provided by the stage3 can either be used as a directory, in which case its contents are stored on the root partition, or you can use it as a mount point for another partition, in which case its contents will be on that partition. This partition is often referred to as the boot partition. (No leading /)

A partition is not a directory, its an area of storage, usually but not always a contiguous group of blocks on a hard drive.
To be useful a partition must contain a filesystem.
To access a filesystem is must be mounted in the filesystem tree. Any directory may be a mount point for a filesystem.

It just happens in your case that the partition holding the boot filesystem (no leading /) needs to be mounted on the /boot directory so you can use use it.
There are three different uses of the word boot there and they are not really interchangeable.
There is boot the partition, boot the filesystem and /boot the directory (with the leading /).

The first two are often used interchangeably. You may get confused, your system will not.
_________________
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
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 34
Location: 38.7789° N, 90.6031° W

PostPosted: Tue May 19, 2015 7:27 pm    Post subject: Reply with quote

Code:

root #mkdir /mnt/gentoo/boot
root #mount /dev/sda1 /mnt/gentoo/boot


So would this be right to use the boot partition as the /boot directory? If I have /dev/sda1 setup to be my boot partition.
And then remove the /boot directory from the root partition after first boot.


Sorry if i'm being a pest. I'm just trying to convert to the Gentoo way of thinking.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue May 19, 2015 8:02 pm    Post subject: Reply with quote

steveo314,

Yes and No.

Your code snippet is correct.
If you remove the /boot directory from / (root) after your first boot, your system will continue to work but how will you ever install kernel updates?
You will need to recreate it.

/boot is like a hook that you hang your boot partition on when you want to change it.

/etc/fstab:
# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1      /boot      ext2      noauto,noatime   1 2

Your /etc/fstab will have a fragment something like the above. This file is read at boot time, so that the system can build the filesystem tree.
The filesystem tree behaves like its a single data structure. It need not be. It can be spread over several hard drives, even spread over several networked systems.

The entry above tells the system that /dev/sda1 holds the filesystem that should be mounted on the /boot directory but the noauto option sells the system not to mount it automatically.
Rather when you give the commands mount /boot or mount /dev/sda1 this file is consulted to discover the rest of the information that mount needs.

Its not a good idea to take down your /boot hook.
_________________
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
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 34
Location: 38.7789° N, 90.6031° W

PostPosted: Wed May 20, 2015 4:15 pm    Post subject: Reply with quote

So basically use the /boot directory to do kernel work and then move the files from there to the boot directory?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed May 20, 2015 6:07 pm    Post subject: Reply with quote

steveo314,

/boot is a directory
boot is a partition. The former is a hook for the latter. They are not the same thing.

If you put things in /boot when the boot partition is not mounted, then mount boot over the top, the contents of the /boot directory will be hidden.

When you want to do kernel things remember to put boot onto the /boot hook first.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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