# "fstab" line mystifies; wo ist das /boot? [SOLVED]

## gentsquash

[This is a long-winded posting, because I don't understand enough

to make it short-winded.]

Ages ago a friend and I installed Gentoo 2.4.24 on

my wife's notebook computer (she does her work the Windows side)

but I now find that I don't understand the "fstab" that I see

there.  [Disk partitions mystify me, currently.]

The commented-out /dev/BOOT line, below, is what bewilders me, as

will be evident from my naive questions to follow.

```

# /etc/fstab: static file system information.

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.12 2003/03/11 02:50:53 azarah Exp $

...

# <fs>               <mountpoint>    <type>       <opts>   <dump/pass>

## /dev/BOOT         /boot           ext2         noauto,noatime 1 1

/dev/hda6            /               reiserfs     noatime        0 0

/dev/hda5            none            swap         sw             0 0

/dev/cdroms/cdrom0   /mnt/cdrom      iso9660      noauto,ro      0 0

...(comments)

none                 /proc           proc         defaults       0 0

...(comments)

none                 /dev/shm        tmpfs         defaults      0 0

/dev/hda2            /windows/C      vfat          defaults      0 0
```

0: With "/dev/BOOT" commented-out, the system boots (with some

problems probably unrelated to "fstab") and the boot ptn *IS*

(somehow) mounted, e.g., I see "/boot/grub/grub.conf".

I don't see a "/dev/BOOT" in "/dev/" --is it an abbreviation

for something?  Shouldn't the boot ptn have a device name

"/dev/hda<NUMBER>"?  

If so, how do I find out what it is?

1: When I un-comment the /dev/BOOT line, then booting produces an

error message (retyped: I haven't found it in "/var/log/")

```

fsck.ext2: No such file or directory while trying to open /dev/BOOT

/dev/BOOT:

The superblock could not be read or does not describe a correct ext2

filesystem. 

...

* Fsck could not correct all errors, manual repair needed

```

3: Running `mount -l ' produces

```

/dev/hda6 on / type reiserfs (rw,noatime)

none on /proc type proc (rw)

none on /sys type sysfs (rw)

none on /dev type ramfs (rw)

none on /dev/pts type devpts (rw)

none on /dev/shm type tmpfs (rw)

none on /proc/bus/usb type usbfs (rw)
```

I don't know how to interpret this.

4: I've simplified the situation.  I'm trying to get kernel 2.6.9

running, and am finding different problems depending on which

kernel I boot. Both `devfs' and `udev' are on the system; I don't

yet understand their interaction, and I am trying to switch

entirely to `udev'.  I'm hoping to get "fstab" fixed first, so

that I can clean mount and unmount "/boot/" at will.

    I can't imagine that my fstab problem is a difficult one, but

I don't know the tools to find out the real name (is hda<NUMBER>

a "real name") and filesystem-type of the ptn that I want mounted

at "/boot/".

----------

## Eskarel

Well here's starters. The reason you get an error when you uncomment it is that it's not a specified line. It's one of the placeholder lines from the original gentoo fstab. /dev/BOOT isn't a device you're supposed to fill in the appropriate device in place of BOOT. You're precisely right that it ought to have a hd__ and that you'll have set up when you partitioned the thing. It's probably /dev/hda_ but it could be on another drive.

According to your mount your root partition is /dev/hda6 assuming you don't have more than one hard drive, then your boot partition is on /dev/hda or the first ide master device. In order to find out the partition table for that disk type fdisk /dev/hda press p to print the partition table, then q to quit, don't do anything else.

You'll see something a little bit like mine.

Disk /dev/hda: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1               1          13      104391   83  Linux

/dev/hda2   *          14        5755    46122583+   7  HPFS/NTFS

/dev/hda3            5756        9729    31921155    f  W95 Ext'd (LBA)

/dev/hda5            5756        5886     1052226   82  Linux swap

/dev/hda6            5887        9729    30868866   83  Linux

Basically what you're looking for is a partition which isn't windows(assuming you're dual booting), isn't swap and isn't /dev/hda6. In my particular case my boot partition is /dev/hda1. If you can't work it out print your partition table.

Why your boot partition mounts itself with no problems I'm not entirely sure, though there are a number of possible reasons.

As for udev and devfs if you have devfs compiled into your kernel you'll have that otherwise you'll have udev. They don't interact together because they are mutually exclusive. You can have devfsd and udev emerged, but your kernel will run only one.

----------

## bernath

 *gentsquash wrote:*   

> 
> 
> 0: With "/dev/BOOT" commented-out, the system boots (with some
> 
> problems probably unrelated to "fstab") and the boot ptn *IS*
> ...

 

/boot is not listed when you say mount, but you see files in /boot/. it seems you do not have a separate boot partition. you boot from your root partition (/dev/hda6). this should be no problem however. 

 *gentsquash wrote:*   

> 
> 
> 4: I've simplified the situation.  I'm trying to get kernel 2.6.9
> 
> running, and am finding different problems depending on which
> ...

 

if you really want to mount and unmount /boot at your will (which again: is not necessary), you will have to: 

1. create a new partition with fdisk (size ~30MB)

2. create a filesystem on that partition (type reiserfs should be ok)

3. mount that partition temporary under /mnt/boot

4. copy everything from /boot/ to /mnt/boot/

5. unmount /mnt/boot

6. delete everything from /boot/

7. edit fstab (replace /dev/BOOT with /dev/hdaX

8. mount /boot

9. edit /boot/grub/grub.conf to point to your new partition

10. reinstall grub in the MBR

note, that it is easy to mess something up in grub.conf with a typo, so make sure you have some linux livecd around, so that you can get into your system again if boot fails. also be very careful with fdisk.

recommended reading:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml

it would be great to find out, what is on /dev/hda1, do this with

```
fdisk -l /dev/hda
```

if it says on the line /dev/hda1 something like W95 FAT32 or NTFS, you can be sure, there is nothing that has to do with linux boot partition. if on that line it says linux, try to mount that partition to /mnt/temp or whereever and have a look at it.

cheers,

gabor

----------

## gentsquash

Thank you Eskarel for your quick and clear reply.

```

bash-2.05b# fdisk /dev/hda

The number of cylinders for this disk is set to 2432.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 20.0 GB, 20003880960 bytes

255 heads, 63 sectors/track, 2432 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1               1           4       32098+  de  Dell Utility

/dev/hda2   *           5        1037     8297572+   c  W95 FAT32 (LBA)

/dev/hda3            1039        2431    11189272+   f  W95 Ext'd (LBA)

/dev/hda5            1039        1102      514048+  82  Linux swap

/dev/hda6            1103        2431    10675161   83  Linux

```

Am I correct in concluding that /dev/hda1 must be the /boot/ ptn?

How do I determine its filesystem type, e.g, "reiserfs" or

"ext2"... ?

----------

## gentsquash

In trying to determine the fs-type of hda1 I tried.

```

/mnt# mount -t ext2 /dev/hda1  /mnt/Tmp/

mount: wrong fs type, bad option, bad superblock on /dev/hda1,

       or too many mounted file systems

/mnt# mount -t reiserfs /dev/hda1  /mnt/Tmp/

mount: wrong fs type, bad option, bad superblock on /dev/hda1,

       or too many mounted file systems

/mnt# mount -t ext3 /dev/hda1  /mnt/Tmp/

mount: fs type ext3 not supported by kernel
```

Since /boot/ is already mounted, maybe I'm not

allowed to mount it simultaneously at two mnt-points, so I tried

```

/mnt# umount /dev/hda1

umount: /dev/hda1: not mounted

/mnt# umount /boot

umount: /boot: not mounted
```

Nonetheless, 

```

/mnt# ls /boot

boot  grub  kernel-2.6.9  vmlinuz-2.4.23  vmlinuz-2.4.24  vmlinuz-2.6.9
```

So why does the system claim "/boot/" is unmounted, when I can

look at its files?

What is "/boot/"'s  mysterious filesystem type?

----------

## TrueDFX

As bernath already explained, /boot is a directory on /. You can look at its files because / is mounted. It's the same as any other directory. /boot doesn't need to be on a separate partition.

----------

## gentsquash

Thank you --I did (incorrectly) assume that /boot had to have its

own ptn.

I won't then bother with changing the partitioning.  My plan,

unless counseled otherwise, is to simply delete the

to-me-confusing "fstab" line

```

## /dev/BOOT   /boot   ext2         noauto,noatime 1 1
```

The remaining mystery for me is:  What is

```

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1               1           4       32098+  de  Dell Utility
```

for, and what is its filesystem type?

----------

## TrueDFX

After a quick search, "Dell Utility" partitions are FAT partitions (mount -t vfat) that contain some diagnostics and/or management tools. Nothing really important.

----------

## gentsquash

Thank you TrueDFX, Eskarel and bernath.

(How could I have directly detected that the Dell ptn was "vfat"?)

BTWay, there were crossed postings; my two replies to Eskarel

were composed before bernath's post, and I did not realize that a

posting had come in when I sent them.  Indeed, I didn't know of

bernath's (excellent) post until I read TrueDFX.

I've marked this thread as [Solved].

----------

## TrueDFX

 *gentsquash wrote:*   

> (How could I have directly detected that the Dell ptn was "vfat"?)

 Usually, you can mount partitions without a -t option. mount will then try to guess the type itself. After that, /etc/mtab would show the type. I don't know if it would've worked in your situation, though.

----------

## gentsquash

Ya, I already tried mounting without -t; on hda1 it produced 

```

mount: you must specify the filesystem type
```

However, I *could* do that on hda6.  Thanks for all your help;

now I need to get back to my kernel problem...  (Fortunately,

my other machine is working fine.)

----------

