You are not logged in.

#1 2011-05-03 08:00:56

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

[solved] Boot partition does not mount with fstab

Hello

My Server is a very old computer and the BIOS cannot work with big hard disks, so I had to make a boot partition at the very beginning of the harddisk.

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63       64259       32098+  83  Linux
/dev/sda2           64260     1060289      498015   82  Linux swap / Solaris
/dev/sda3         1060290   390716864   194828287+  83  Linux

sda1 contains the directory "boot" with all files.

The problem is that the boot partition is NOT mounted after archlinux is started.

 ls /
bin  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

As you see, the boot directory is missing. This leads to problems e.g. when upgrading the kernel.
So why is it missing?

This is my fstab

]# cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
UUID=36e2f5be-59b4-42f5-901d-f2bc67c957bf / ext4 defaults 0 1
UUID=1b1b8ba3-24ed-4899-aa4d-b423bdcb927d / ext4 defaults 0 1
UUID=066d91ed-7a2c-4f11-a741-6461bca4b06f swap swap defaults 0 0

I can mount it manually, but not to /, only to other directories like /mnt (WHY cant I mount it to / ???? )

[root@icarus blaster]# mount /dev/disk/by-uuid/36e2f5be-59b4-42f5-901d-f2bc67c957bf /
[root@icarus blaster]# ls /
bin  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  run  sbin

AS YOU SEE BOOT HAS NOT BEEN MOUNTED

[root@icarus blaster]# mount /dev/disk/by-uuid/36e2f5be-59b4-42f5-901d-f2bc67c957bf /mnt
[root@icarus blaster]# ls /mnt/
boot

NOW BOOT HAS BEEN MOUNTED

Last edited by cyberius (2011-05-03 22:21:15)

Offline

#2 2011-05-03 08:15:55

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: [solved] Boot partition does not mount with fstab

Check your fstab - as it is you are asking it to mount two / partitions - my guess is that one of them should be /boot


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#3 2011-05-03 08:22:47

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: [solved] Boot partition does not mount with fstab

Your fstab is wrong (you are mounting root twice when you mean to mount 36e2f5... as /boot). Replace it with this:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
UUID=36e2f5be-59b4-42f5-901d-f2bc67c957bf /boot ext4 defaults 0 1
UUID=1b1b8ba3-24ed-4899-aa4d-b423bdcb927d / ext4 defaults 0 1
UUID=066d91ed-7a2c-4f11-a741-6461bca4b06f swap swap defaults 0 0

Last edited by neurolysis (2011-05-03 08:23:19)

Offline

#4 2011-05-03 17:51:19

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

Re: [solved] Boot partition does not mount with fstab

Hello

Yes but this is a bit of a problem, let me try to explain:

On the wiki I read that GRUB needs to be in a "boot" directory, so my boot partition sda1 contains boot/grub

When I mount it to /boot, after booting I get this in my filesystem:

/boot/boot/grub

That works fine, but isnt there a possibility to mount it to "/" so that I only have one "boot" (-> /boot/grub).

If I update the kernel how does it know that the kernel resides in "/boot/boot/vzlinux..."

thank you

Offline

#5 2011-05-03 17:57:58

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: [solved] Boot partition does not mount with fstab

Move 'boot/grub' to 'boot' in the root of your boot partition. Then mount your boot partition under '/boot'. Do not mount two filesystems over each other.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#6 2011-05-03 21:51:07

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

Re: [solved] Boot partition does not mount with fstab

Excuse me, but I don understand you correctly...

https://wiki.archlinux.org/index.php/GRUB sais "GRUB files always reside under /boot, which may be on a dedicated partition."
So I think I HAVE to HAVE a "boot" directory on the boot partition sda1? Like boot/grub...

And when I mount it to /boot via fstab I get /boot/boot in my filesystem. Or can I install grub just on the root on my boot partition?

Offline

#7 2011-05-03 21:57:24

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: [solved] Boot partition does not mount with fstab

Yes. grub/ should be at the root of one of your partitions, and then mount that partition as /boot/.

Offline

#8 2011-05-03 22:21:00

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

Re: [solved] Boot partition does not mount with fstab

wow it worked, thanks! So I missunderstood the wiki smile

Offline

Board footer

Powered by FluxBB