LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2012, 12:18 PM   #1
sunilbn
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
creating grub iso image


Hi:

I basically have two question about grub. I'm running linux mint maya 13 on my system.

1) how to compile grub (version 0.95) source code got from ftp://alpha.gnu.org/gnu/grub/ ?

Here's what i tried to do:

bash# cd /usr/src/grub-0.95
bash# export CC="gcc -mcpu=i386"
bash# ./configure --host=i386-pc-linux-gnu --without-curses
bash# make

but sadly i got some error,

configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i386-pc-linux-gnu-strip... no
checking for strip... strip
checking build system type... i686-pc-linux-gnu
checking host system type... i386-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking for i386-pc-linux-gnu-gcc... gcc -mcpu=i386
checking for i386-pc-linux-gnu-gcc... (cached) gcc -mcpu=i386
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -mcpu=i386 accepts -g... yes
checking for gcc -mcpu=i386 option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc -mcpu=i386... gcc3
checking dependency style of gcc -mcpu=i386... (cached) gcc3
checking for i386-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking whether optimization for size works... yes
checking whether gcc has -fno-stack-protector... yes
checking whether -Wundef works... yes
checking whether -falign-loops works... yes
checking for i386-pc-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking if C symbols get an underscore after compilation... no
checking whether objcopy works for absolute addresses... no
configure: error: GRUB requires a working absolute objcopy; upgrade your binutils

how to fix this line? Does it mean i have to install someother version of objcopy?

2) How do i create an iso image from grub binaries (stage1 and stage2) ? Only grub UI with dummy entries no real kernel to load.

Thanks,
-Sunil
 
Old 09-02-2012, 12:42 PM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
It tells you what to do - upgrade binutils, not objcopy. However, a more pertinent question is perhaps "Why? What are you trying to achieve?". I can see no reason for a live CD that doesn't load anything...
 
Old 09-02-2012, 01:16 PM   #3
sunilbn
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Well, to understand how grub works I thought creating a dummy grub that loads nothing would be sufficient ( including building grub and creating an ISO image). But I'm stuck at the initial step itself. I would appreciate if could comment on my second question.
 
Old 09-02-2012, 01:36 PM   #4
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
I don't know much about liveCDs, but I get the impression that it's different to how the MBR works. You would be better off with something like bochs, which allows you to emulate a computer booting normally. Take a look at this thread (and I'm sure countless other ones, and pages on the web) for a high-level view of what the code does, and then you could look at the source code itself, and then compile and install grub in a bochs image.

If you do want to continue with a live CD, I know that it treats the first sector of the CD as a floppy disk, so you can read http://www.vnutz.com/content/program_a_bootstrap_loader for an example of writing a bootable floppy, then you'd have to work out how to load the rest of the CD from that - any way you do it, it's gonna be a lot of assembly code.

Last edited by Snark1994; 09-02-2012 at 01:41 PM. Reason: Found better OS link
 
Old 09-02-2012, 01:48 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
It would seem the best source for information of this kind would be the Grub site. See the link below for an explanation of creating a Grub boot CD. Basically, all you need is the stage2_eltorito file and if you want to boot anything, you will need a menu.lst. You could probably just use the chainloader method.

http://www.gnu.org/software/grub/man...ble-CD_002dROM

Last edited by yancek; 09-02-2012 at 01:51 PM. Reason: Insert link
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Creating bootable ISO image tekmann33 Linux - Newbie 9 06-04-2009 03:23 PM
K3B and creating an .iso image from a CD? rgbrock1 Linux - Software 5 11-23-2005 12:17 PM
Creating an ISO image of a CD tawalker Linux - Software 2 01-27-2005 12:03 AM
Creating ISO image question satimis Linux - Software 1 07-17-2004 12:32 AM
Creating dvd iso image chevy2410 Linux - Software 1 06-08-2004 07:40 AM


All times are GMT -5. The time now is 02:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration