LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   No grub.conf or menu.1st (https://www.linuxquestions.org/questions/ubuntu-63/no-grub-conf-or-menu-1st-771955/)

AndyD236 11-27-2009 12:07 PM

No grub.conf or menu.1st
 
I have a Ubunut 9.10 server that has no grub.conf or /boot/grub/menu.1st file (at least that i can find)? The system boots fine. Is there a different grub configuration file in 9.10 or am i just looking in the wrong place?

Thanks

camorri 11-27-2009 12:15 PM

Grub 2 is now the default boot loader for buntu 9.10. The default file system is ext4. You need Grub 2 to read ext4 file systems. The config file is now called grub.cfg. The default location is /boot/grub/

Here is a link if you want to read more. http://www.linuxtoday.com/news_story...05-35-OS-HL-SW

Lordandmaker 11-27-2009 12:18 PM

Quote:

Originally Posted by camorri (Post 3771624)
The default location is /boot/grub/

In Ubuntu 9.10 it's /etc/default/grub

Handy reference to the new grub config file.

AndyD236 11-27-2009 04:49 PM

...
 
OK, thanks, that helps.

I still don't see which file I need to modify to tell the system where the kernel is (e.g. /boot). Reason is that I need to move /boot from it's own seperate partition to under the / partition. Any idea where I do this?

Thanks

camorri 11-27-2009 06:20 PM

The last link leads you here -->https://help.ubuntu.com/community/Gr...0Custom%20Menu

There are examples of how to add a custom menu, including a new kernel. You will have to do a little reading.

AndyD236 11-28-2009 09:05 AM

...
 
Thanks.

However, I still think I am missing something because of the following strange behavior.

The goal of what I am trying to do is to move /boot from it's own partition (/dev/sda1) to the / partition (/dev/sda2). I was able to do this by making a new /boot directory, copy everything from the original /boot, then unmounted /boot and moved the new dir to /boot under /. Modified fstab to remove the reference to original /boot and ran update-grub. upon reboot this worked. Out of curiousity I remounted /dev/sda1 on /mnt and deleted all the old /boot files and dirs that were there, rebooted, but then the system wouldn't boot. I had to go back in with a rescue CD, mount /dev/sda1 and copy all the files and dirs from the new /boot to /dev/sda1, rebooted and it worked. So why does it matter that there be the old /boot stuff on an unmounted file system????? It just doesn't make sense. Does anyone know what's going on here? Clearly I am missing something.

Thanks

camorri 11-28-2009 11:10 AM

I suspect you did not update the correct files for grub2. You do not edit grub.cfg file.

In order to make changes, you edit this file '/etc/grub.d/40_custom' file. Then you run update-grub to modify the grub.cfg file.

Have a close look at the sample updates. Three should be one there that is close to what you need to do. The uuid's will be different. You have to get them from your own system.

Hope this helps.

AndyD236 11-28-2009 12:21 PM

....
 
I did not edit the 40_custom file, but I did run update-grub and I guess it searches the system because it found the new /boot (dev/sda2). When I ran this /dev/sda1 was unmounted. After I ran that I did check grub.cfg and it had the right entries, set root=(hd0,2). But something is still telling it to look at /dev/sda1. If I leave /dev/sda1 alone, unmounted, the system boots and uses the /boot from /dev/sda2. I verified this by cd /boot and doing a df . which shows it is mounted on /dev/sda2. If I delete the files in /dev/sda1 or delete the partition completely it will not boot. Could this have something to do with the MBR?

Where are the sample updates for 40_custom?

How do I determine UUID's?

Thanks again.

camorri 11-28-2009 06:06 PM

Quote:

A sample entry copied from the grub.cfg and altered by the user might look like this:

*

menuentry "My Default Karmic" {

set root=(hd0,1)

search --no-floppy --fs-uuid --set cb201140-52f8-4449-9a95-749b27b58ce8

linux /boot/vmlinuz-2.6.31-11-generic root=UUID=cb201140-52f8-4449-9a95-749b27b58ce8 ro quiet splash

initrd /boot/initrd.img-2.6.31-11-generic
I went here-->https://help.ubuntu.com/community/Gr...0Custom%20Menu as posted above and cut and pasted the above from that page. This is just one example, there are more.

Open a konsole, run the command 'sudo blkid' and it will give you some output like this...

Quote:

# blkid
/dev/sda1: UUID="5bdcec7b-aa25-42cd-b3e9-a8c587f22b3e" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="6e4122f5-1675-4906-b241-4b077357a261"
/dev/sda6: UUID="088dfcfa-aeee-4b3b-9f03-32924a6a0735" SEC_TYPE="ext2" TYPE="ext3"
This is from my system. They will be different from your system, you should get one for each partition.

The only way you are going to get this to work, as you want is to edit 40_custom file, and then run 'update-grub. The custom entry needs to point to the new /boot directory you are making.


All times are GMT -5. The time now is 02:02 AM.