# /boot/grub/grub.conf gone?

## lo-jay

just trying to fix s.th. in grub.conf it does not seem to be there anymore?

```

# nano -w /boot/grub/grub.conf

```

shows  *Quote:*   

> New File

  wil say an empty one.

```
 cat /mnt/gentoo/boot/grub/grub.conf

cat: /mnt/gentoo/boot/grub/grub.conf: No such file or directory

```

```
# cd /boot/

tux boot # ls -al

total 6090

drwxr-xr-x  2 root root     152 Nov  6 14:05 .

drwxr-xr-x 26 root root     832 Nov  6 17:30 ..

lrwxrwxrwx  1 root root       1 Nov  6 14:05 boot -> .

-rw-r--r--  1 root root 2117293 Sep 26  2006 kernel-2.6.17-gentoo-r4

-rw-r--r--  1 root root 4110944 Aug 25 22:48 kernel-2.6.30-gentoo-r5
```

is there some link i do not see?

sure do not want ot reboot right now to try out...

confused  :Question: 

----------

## durian

Do you have /boot on a seperate partition?

If so, maybe it wasn't mounted, and therefore created an empty file.

-peter

----------

## lo-jay

well, yes i guess:

```
 # fdisk -l                 

Disk /dev/sda: 74.3 GB, 74355769344 bytes

255 heads, 63 sectors/track, 9039 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00000000                     

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux 

/dev/sda2              14         138     1004062+  83  Linux 

/dev/sda3             139         625     3911827+  83  Linux 

/dev/sda4             626        3179    20515005    5  Extended

/dev/sda5             626        2328    13679316   83  Linux

/dev/sda6            2329        2815     3911796   83  Linux

/dev/sda7            2816        3179     2923798+  83  Linux

Disk /dev/sdb: 640.1 GB, 640135028736 bytes

255 heads, 63 sectors/track, 77825 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x4231adea

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1       77825   625129281   83  Linux

Disk /dev/sdc: 203.9 GB, 203928109056 bytes

255 heads, 63 sectors/track, 24792 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

/dev/sdc1               1       24792   199141708+  83  Linux

```

----------

## StringCheesian

Do you have a "/boot" in your /etc/fstab?

----------

## lo-jay

yes

```
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda1               /boot           ext2            defaults,noatime  1 2

/dev/sda3               /               reiserfs        noatime         0 1

/dev/sda2               none            swap            sw              0 0

/dev/sda5               /usr            reiserfs        defaults,noatime 0 2

/dev/sda6               /var            reiserfs        defaults,noatime 0 2

/dev/sda7               /tmp            reiserfs        defaults,noatime 0 2

/dev/sdb1               /home           reiserfs        defaults,noatime 0 2

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

/dev/hda                /mnt/cdrom      iso9660         noauto,ro,user  0 0

/dev/fd0                /mnt/floppy     vfat            noauto,user     0 0

# NOTE: The next line is critical for boot!

none                    /proc           proc            defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

none                    /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

```

what i get when trying to mount /boot is:

```
# mount /boot

mount: unknown filesystem type 'ext2'

```

but i do not think that's the prob, i always saw this in the boot splash - still

i do not understand why...

anyhow my question is if i should create a new grub.conf or risk ending up with somehow

multiple configs???

----------

## Ahenobarbi

 *lo-jay wrote:*   

> 
> 
> what i get when trying to mount /boot is:
> 
> ```
> ...

 

Do you have etx2 support in kernel? If no you will be able to boot ( because GRUB will be able to accer boot partition). Your Gentoo will be unable to acces /boot. If you dont have etx2 support then build is as module, make modules_install. Then modprobe ext2 and try mouning /boot

---

Note:

grep EXT2 /usr/src/linux/.config

----------

## lo-jay

ok, i see! i do not have ext2 support in my kernel.

```
# CONFIG_EXT2_FS is not set
```

but that means grub.conf exists, i just can not access it from gentoo  :Question: 

so i should recompile the kernel with ext2?

thanks again!

----------

## Ahenobarbi

 *lo-jay wrote:*   

> ok, i see! probably i do not have ext2 support in my kernel.
> 
> but that means grub.conf exists, i just can not access it from gentoo 
> 
> so i should recompile the kernel with ext2?
> ...

 

You probably have grub.cof ( grub doesn't work without it).

Yes you probably don't have ext2 support. You need ext2 support to acces your grub.conf. To get ext2 support you need to build ext2 support as module:

```

#name of kernel you are using

uname -r

#make sure it's the same kernel version you are using

#if it's diffrent you will probably break something

cd /usr/src/linux-version-of-kernel-you-rae-using-goes-here

make menuconfig

#Filesystems->Second extended fs support. Set 'M' not '*'

make

make modules_install

modprobe ext2

mount /boot

```

You could replace your kernel with kernel that supports ext2. It will be harder because you can't acces you /boot.

----------

## RedSquirrel

You can compile a new kernel with ext2 support, but to install the kernel on /boot you will need to use a LiveCD.

If you merely wish to copy your new kernel onto /boot, you can just mount the appropriate partitions and copy the kernel to /boot (as described in the Gentoo Handbook).

Alternatively, if you wish to run 'make install' in the kernel source directory, you will need to boot the LiveCD, mount filesystems and chroot into your system. (chroot is described in the Gentoo Handbook.)

----------

