LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-04-2015, 07:30 PM   #1
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Rep: Reputation: Disabled
LFS 7.7 Modifying existing Grub Boot Loader


Hello all,

How do I exit my existing grub.cfg file so that it can detect my LFS partition on start up.

I have a swap partition on sda10, root partition on sda11 and a boot partition on sda12.

So far I have added the following to grub.cfg
Code:
#Begin LFS setup
# "LFS-7.7 on (/dev/sda11)" {
#	savedefault
#	set root=/dev/sda12
#	linux   vmlinuz-3.19-lfs-7.7 root=/dev/sda11 ro
#}
#End LFS setup
I will uncomment it when I want to boot into the lfs partition

Are there any modifications I have to make for it to work?
Thanks
 
Old 04-04-2015, 07:38 PM   #2
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Rep: Reputation: Disabled
Hi, I think you should have something like this:

menuentry 'LFS 7.7' {
insmod ext2
set root='(hd0,12)'
linux /boot/vmlinuz-3.19-lfs-7.7 root=/dev/sda11 ro single
}
 
Old 04-04-2015, 08:37 PM   #3
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
Thanks, I will try it soon.
 
Old 04-04-2015, 09:01 PM   #4
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Rep: Reputation: Disabled
ok,cool
 
Old 04-04-2015, 10:24 PM   #5
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
The entry was there but it came up with this message:
/boot/vmlinuz-3.19-lfs-7.7 not found or doesn't exist

Maybe it has something to do with the boot partition not mounted?
The file itself is in the boot partition.
 
Old 04-04-2015, 10:42 PM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Which version of grub do you have?

For testing always use grub command line to boot kernels. Afterwards you can make a grub.cfg entry.

Find out the path of kernel file in sda12. Is it in a subdirectory named boot or in root of that filesytem. If in root then you have to pass just '/vmlinuz-3.19-lfs-7.7'.
 
1 members found this post helpful.
Old 04-04-2015, 11:00 PM   #7
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
My version of Grub is :2.02~beta2-9ubuntu1

In sda12, vmlinuz-3.19-lfs-7.7 is in the root of that file system.
 
Old 04-04-2015, 11:09 PM   #8
thinkrorbot
Member
 
Registered: Feb 2015
Location: Sydney, Australia
Distribution: Linux mint 17.1
Posts: 39

Original Poster
Rep: Reputation: Disabled
Thanks veerain, LFS can now boot by just passing vmlinuz-3.19-lfs-7.7 the file.
 
  


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
Using my already existing Grub Bootloader for LFS jemd13 Linux From Scratch 6 06-26-2014 03:12 PM
[SOLVED] adding existing distro back to boot loader robtreed Linux - Newbie 5 03-20-2011 09:52 PM
How to change from grub boot loader to lilo boot loader linuxjamil Linux - Software 1 05-27-2008 01:47 PM
Modifying the grub loader Jayaraghavendran Linux - Software 4 02-21-2006 03:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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

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