LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 11:18 AM   #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, 11:42 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
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, 12: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, 12:36 PM   #4
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
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 12:41 PM. Reason: Found better OS link
 
Old 09-02-2012, 12:48 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
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 12:51 PM. Reason: Insert link
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:37 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