LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-27-2009, 12:07 PM   #1
AndyD236
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Rep: Reputation: 0
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
 
Old 11-27-2009, 12:15 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,233

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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
 
Old 11-27-2009, 12:18 PM   #3
Lordandmaker
Member
 
Registered: Sep 2005
Location: London, UK
Distribution: Debian
Posts: 258

Rep: Reputation: 39
Quote:
Originally Posted by camorri View Post
The default location is /boot/grub/
In Ubuntu 9.10 it's /etc/default/grub

Handy reference to the new grub config file.
 
Old 11-27-2009, 04:49 PM   #4
AndyD236
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
...

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
 
Old 11-27-2009, 06:20 PM   #5
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,233

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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.
 
Old 11-28-2009, 09:05 AM   #6
AndyD236
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
...

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
 
Old 11-28-2009, 11:10 AM   #7
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,233

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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.
 
Old 11-28-2009, 12:21 PM   #8
AndyD236
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
....

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.
 
Old 11-28-2009, 06:06 PM   #9
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,233

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where does grub looks for its grub.conf (menu.lst), where is encoded ? chipotphe Linux - Software 4 12-01-2008 12:22 AM
[GRUB 0.97] No Grub.conf or Menu.lst channi3 Linux - Software 5 01-31-2008 07:43 PM
GRUB menu.lst/grub.conf file with multiple partitions dasy2k1 Linux - General 1 04-19-2007 08:42 AM
Grub problem. What do I put in menu 1st to use the chainloader for Fc6 on hdb10? sleekmason Linux - Software 3 12-10-2006 04:20 PM
grub.conf vs. menu.lst netstv Linux - General 3 11-24-2004 06:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration