LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 05-15-2010, 10:18 PM   #1
bforbes
LQ Newbie
 
Registered: Apr 2006
Posts: 27

Rep: Reputation: 15
Grub2 boot from .img


I'm trying to add ChromeOS-Flow to my multiboot grub2 USB stick. The site:

http://chromeos.hexxeh.net/

gives a .img file and it tells you to use USB-ImageWriter to write it to a USB stick. I'd rather do some loopback trickery, however. Can anyone help me with this?
 
Old 12-04-2010, 03:44 PM   #2
vaniaspeedy
LQ Newbie
 
Registered: Dec 2010
Location: Silicon Valley, California
Distribution: Ubuntu 10.04, 9.10 in a VM,
Posts: 6

Rep: Reputation: 0
I've delved into GRUB and GRUB2 extensively, and I can tell you that grub2 and IMG files do not work well together.
The problem is that you have to load the img into RAM, and then at the right moment pass control of the boot process to the kernel, however grub2 has timing issues.
What I would personally reccomend is that if you have enough space, just extract the img file onto a USB stick. It will create 2 partitions, a C-STATE and C-ROOT. In C-ROOT/boot you will find the file extlinux.conf. It will have this entry:

Code:
  label chromeos-usb
  menu label chromeos-usb
  kernel vmlinuz
  append quiet console=tty2 initrd=initrd.img init=/sbin/init boot=local rootwait root=LABEL=C-ROOT rw noresume noswap i915.modeset=1 loglevel=1
You can then edit your /etc/grub.d/40_custom file to pass control and load the kernel with the same parameters as the ChromeOS loader does.
Code:
menuentry ChromeOS' --class chromeOS --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext3
	set root='(hdX,Y)'
	search --no-floppy --fs-uuid --set 4c921566-bae8-49fb-b6fa-92e675353dd6
	linux	/boot/vmlinuz root=UUID=4c921566-bae8-49fb-b6fa-92e675353dd6 quiet console=tty2 init=/sbin/init boot=local rootwait root=LABEL=C-ROOT rw noresume noswap i915.modeset=1 loglevel=1
	initrd	/boot/initrd.img
}
tips - notice I set the class as ChromeOS, you need to add that class to grub's configuration (google it)
change (hdX,Y) to the partition of C-ROOT
change 4c921566-bae8-49fb-b6fa-92e675353dd6 to the UUID of your partition (C-ROOT, find it through gparted or some other tool)



This might interest you: http://www.lucas-nussbaum.net/blog/?p=485

Good luck, ask away if you need to, I'll help as much as I can.
 
Old 12-06-2010, 05:24 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 10,246

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Might have to use grub4dos if it even could work.

See pendrivelinux.com for more ideas.
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone tried grub2 to boot of an iso? niravshah Linux - Newbie 12 08-03-2010 09:53 AM
[SOLVED] How to get Grub2 to boot OS X with Graphics Mode boot option PaulFXH Linux - General 3 04-17-2010 03:58 AM
Grub2 and iso boot ---- Again niravshah Linux - Newbie 6 09-18-2009 03:32 PM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-01-2007 11:24 PM
.img burner or way to boot from a .img American Psycho Linux - Software 4 03-24-2004 06:40 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration