LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-16-2011, 02:30 AM   #1
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian
Posts: 727

Rep: Reputation: 29
Angry booting Live .iso from Grub2


I am trying to boot live DamnSmallLinux .iso from GRUB2.
this is contents of 40_custom:
Code:
menuentry "ISO - DSL" {
	set isofile="/boot/iso/dsl-4.4.10.iso"
	loopback loop (hd0,msdos5)$isofile
	linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile nomodeset
	initrd (loop)/casper/initrd.lz
}
but it doesn't work. It complains something about no kernel. I suspect its because of 'casper'.
How to make it work?
 
Old 03-16-2011, 09:51 AM   #2
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,841

Rep: Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765
Loop mount the DSL iso to find the kernel: First create a directory in your /home/user directory. mkdir test, then: mount -o loop dsl-4.4.10.iso test. You should then be able to see the DSL directories/files. The DSL version I have has the kernel in the / directory and it is called linux24. The initrd is minirt24.gz. Not sure these files will be the same in your version of DSL. The casper directory, as far as I know, is only used with Ubuntu and its derivatives.

The entry below is what I use to boot DSL off a CD, you'll likely need to modify it for Grub2:

Quote:
title DSL
kernel /linux24 ramdisk_size=100000 init=/etc/init apm=power-off vga=791 noapic BOOT_IMAGE=knoppix
initrd /minirt24.gz
Make sure you get the correct directory/file names. Good luck.
 
1 members found this post helpful.
Old 03-16-2011, 10:07 AM   #3
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,841

Rep: Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765
The entry I posted above is Grub Legacy on a CD so there is no title line. Your casper entry should probably be changed to knoppix.
 
Old 03-17-2011, 01:59 AM   #4
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian
Posts: 727

Original Poster
Rep: Reputation: 29
thanks, but in your example there is no path to .iso ?
also, grub2 says 'kernel' is unknown command, tried with 'linux' instead but still doesn't boot.

Last edited by qrange; 03-17-2011 at 02:18 AM.
 
Old 03-17-2011, 09:58 AM   #5
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,841

Rep: Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765
Quote:
thanks, but in your example there is no path to .iso ?
Correct. As I stated in my post above, the entry I showed is for Grub Legacy and you will need to modify it for Grub2.
You will probably need to replace your casper entries with knoppix.
You will also need to mount the iso image of DSL to find out what the kernel and initrd files are actually named.
In the version of DSL I have, the kernel is "linux24" and the initrd is "minirt24.gz".
You will also need to verify where the kernel and initrd files are. In the version I have, they are in root directory.

The original error message from your first post is because it is looking for the kernel in the casper directory which
does not exist. Also, it is probably named incorrectly. Find the correct name for the kernel by mounting the iso first.

Quote:
also, grub2 says 'kernel' is unknown command, tried with 'linux' instead but still doesn't boot.
Again, that is because the entry is from Grub Legacy and as I said you will need to modify it for Grub2.
You could try the entry below. Obviously, you will need to verify those are the correct kernel/initrd names and locations
by mounting the iso. Check the isolinux.cfg entry on the mounted DSL iso to see what the entry is there and modify it if necessary.

Quote:
menuentry "ISO - DSL" {
set isofile="/boot/iso/dsl-4.4.10.iso"
loopback loop (hd0,msdos5)$isofile
linux (loop)/linux24 ramdisk_size=100000 init=/etc/init apm=power-off vga=791 noapic BOOT_IMAGE=knoppix iso-scan/filename=$isofile nomodeset
initrd (loop)/minirt24.gz
}
I haven't tried this so I don't know if it will work.

Last edited by yancek; 03-17-2011 at 10:00 AM.
 
Old 03-18-2011, 02:50 AM   #6
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian
Posts: 727

Original Poster
Rep: Reputation: 29
nope, doesn't work. I changed your "(loop)/linux24" to "(loop)/boot/isolinux/linux24" (and did the same for minirt) but computer just resets. seems like dsl simply isn't made to run this way?
:/


I found this interesting link:
http://knol.google.com/k/yoshihide-n...zr3sm0dzndc/1#
perhaps we also need modified 'initrd'?

Last edited by qrange; 03-18-2011 at 03:31 AM.
 
Old 03-18-2011, 10:55 AM   #7
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,841

Rep: Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765
Didn't really think it would work and I guess the information in the link you posted pretty much explains why.
I haven't used Grub2 much. I put Ubuntu and several of its derivates on a DVD as iso files and booted them. Tried
a couple of non-ubuntu without much luck. Did manage to get Parted Magic to boot from iso. Haven't really experimented much with this.
 
1 members found this post helpful.
Old 05-05-2011, 03:01 AM   #8
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian
Posts: 727

Original Poster
Rep: Reputation: 29
just an update, found this useful file:
http://pendrivelinux.com/downloads/m...linux/grub.cfg

they say that
"Adding an Unlisted ISO: To try ISO Files that are not yet listed, use the existing menuentry examples in /boot/grub/grub.cfg and append any options normally found in the distributions syslinux.cfg file on the "append" line to the "linux" line of the menu entry.

Please inform me of entries you get to work and I will add them to the list, so that others may benefit as well."



I believe that if it works with USB it should work with HDD, too.
 
Old 05-05-2011, 09:56 AM   #9
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,841

Rep: Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765
Quote:
use the existing menuentry examples in /boot/grub/grub.cfg and append any options normally found in the distributions syslinux.cfg file on the "append" line to the "linux" line of the menu entry
In isolinux.cfg and syslinux.cfg files, the options are on the intrd line and in Grub Legacy they are on the kernel line and in Grub2 they are on the linux line.

Post the menuentry you used for DSL.
 
Old 05-05-2011, 10:05 AM   #10
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian
Posts: 727

Original Poster
Rep: Reputation: 29
didn't make DSL work yet. the plan is to use usb installer and then grab its menuentry for DSL and knoppix.
perhaps it might be necessary to unpack .iso, we'll see.
 
Old 05-05-2011, 10:54 AM   #11
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,841

Rep: Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765
In your first post, you show the DSL iso as being in /boot/iso subdirectory of sda5 (hd0,msdos5).
If that is where the DSL iso is, leave the setisofile line as is. If your DSL iso is elsewhere, you will need to change that.
Have you loop mounted the DSL iso to find where your kernel (linux24) actually is. The version I had showed it in the / directory and your entry shows it in /boot/isolinux:

Quote:
"(loop)/boot/isolinux/linux24
 
Old 05-05-2011, 12:44 PM   #12
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,841

Rep: Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765
I don't have a DSL iso to test but do have the Parted Magic. The entry below boots pmagic iso from Ubuntu with Grub2.

Quote:
menuentry "PMagic-5.10 Partition Editor" {
loopback loop (hd0,5)/pmagic-5.10.iso
linux (loop)/pmagic/bzImage isofrom=/dev/sda5/pmagic-5.10.iso root=/dev/ram0 livecd edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=788 loglevel=0 max_loop=256 vmalloc=256MiB
initrd (loop)/pmagic/initramfs
}
You will obviously need to change the menuentry line to whatever DSL you have.
The loopback loop line may need to change. On my system, Ubuntu is on sda5 (hd0,5) and pmagic is in the / directory. If you have your DSL iso file elsewhere, you will need to change that to reflect where it actually is. If it doesn't boot from a subdirectory such as /boot/isolinus/, try putting the iso file in /.

The linux (loop) line needs the isofrom=/dev/sda5/your dsl iso filename here.
The entries above for pmagic will obviously not work. You will need to loop mount the DSL iso and get the correct lines from syslinux.cfg or isolinux.cfg. The append options will need to go on the linux (loop) line.
 
Old 05-06-2011, 03:12 AM   #13
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian
Posts: 727

Original Poster
Rep: Reputation: 29
well, I've installed this: http://www.pendrivelinux.com/multibo...sb-from-linux/

it created this grub2:
Code:
menuentry "Damn Small Linux" {
linux16 /boot/bootdistro/damnsmall/isolinux/linux24 knoppix_dir=damnsmall ramdisk_size=100000 lang=en apm=power-off nomce noapic quiet BOOT_IMAGE=knoppix
initrd16 /boot/bootdistro/damnsmall/isolinux/minirt24.gz
}

I've tried it. it loads kernel, then starts scanning usb drives. but complains 'cannot find knoppix filesystem, dropping you to very limited shell'.
its the same type of problem with KnoppixV6.4.4


edit:
if I understood this post correctly: http://www.knoppix.net/forum/threads...l=1#post115124

then my problem is that file 'KNOPPIX' (48.2Mb) is located on ext3 partition, not fat16.
so then extlinux must be used?

Last edited by qrange; 05-06-2011 at 03:59 AM.
 
Old 05-06-2011, 10:07 AM   #14
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,841

Rep: Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765Reputation: 765
The entry in your last post should work to boot DSL from the usb but I doubt it will work from the drive. I though you wanted to boot the iso image? If you just want to boot DSL from the drive, install it to a partition and run sudo update-grub.


Quote:
menuentry "DSL" {
loopback loop (hd0,5)/dsl-4.4.10.iso
linux (loop)/KNOPPIX/boot/isolinux/linux24 isofrom=/dev/sda5/dsl-4.4.10.iso ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 nomce noapic quiet BOOT_IMAGE=knoppix
initrd (loop)/KNOPPIX/boot/isolinux/minirt24.gz
}
I used another version of DSL to create the entry above. Your DSL iso will need to be in the root (/) of sda5. If you have the iso image elsewhere you will have to change the entry above to suit. Where Knoppix is in upper-case letters, it will need to be upper-case. Where it is lower-case, it will need to be lower case.

The pendrive linux creates different directories during the installation than you will see on a standard install CD. Copy the dsl-4.4.10.iso to the root of sda5 before trying this. Haven't tested this as I don't have an iso file of DSL?
 
Old 05-06-2011, 11:01 AM   #15
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian
Posts: 727

Original Poster
Rep: Reputation: 29
no, I don't want to create a partition for DSL, it doesn't matter if its started as an .iso or some other way, as long as it lives in /boot/dsl.

/ belongs to Debian installation. no more partitions.

Last edited by qrange; 05-06-2011 at 11:03 AM.
 
  


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
Booting Slackware Install ISO from Grub2 cov Slackware 1 03-12-2011 03:19 AM
Booting FreeBSD iso grub2 jmc1987 Linux - Newbie 3 01-20-2011 08:03 PM
booting remastersys iso using grub2 anandogc Linux - Software 5 08-27-2010 07:39 AM
[SOLVED] Booting Debian ISO with grub2 and a separate Kernel deepclutch Linux - General 4 05-23-2010 05:30 AM
Mount ISO as specific device (ie: /dev/sda1) with GRUB2 to boot KNOPPIX live cd iso BLuFeNiX Linux - General 2 12-23-2009 01:31 AM


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