You are not logged in.

#1 2007-09-21 23:21:52

Notturno
Member
Registered: 2007-08-26
Posts: 18

Install within directory

In the process of developing a live Cd I have installed Arch in a directory /dev/hda2/a/ArchImage

I configured grub menu.lst in the main arch install in order to boot into it.
My grub menu entry is:

# (0) arch
title  arch
root   (hd0,1)
kernel /a/ArchImage/boot/vmlinuz26 root=/dev/hda2/ ro
initrd /a/ArchImage/boot/kernel26-fallback.img

It boots ok but gives me an error complaining it cannot find the root

I have try several options like:
root=/dev/hda2/a
root=/dev/hda2/a/ArchImage

any idea about how I could fix it?

Offline

#2 2007-09-22 21:35:01

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Install within directory

I'll take a stab at it.

...
root (hd0,1)
kernel /boot/vmlinuz26 root=/dev/hda2/a/ArchImage ro
initrd /boot/kernel...

By the way, I'm not a grub developer or anything.  But I did stay at a Holiday Inn last night.

\\//_

Offline

#3 2007-09-24 03:53:49

Notturno
Member
Registered: 2007-08-26
Posts: 18

Re: Install within directory

tried that alrwady but doesn't work

Offline

#4 2007-09-24 07:23:40

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Install within directory

have you tried adding a / at the end of ArchImage ? So grub sees the contents of ArchImage instead of just the ArchImage folder. That's just a guess though.


-- archlinux 是一个极好的 linux

Offline

#5 2007-09-24 08:01:30

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Install within directory

uhmmm... i think what you specify with the root-parameter has to be an actual device. It needs to mount a filesystem. Specifying a directory in a filesystem won't work, because the filesystem isn't mounted yet.
I think it is possible to do, but you have to create a custom init for the initramfs, in which you start a minimal filesystem in a ramdisk, build up the root from there in a sepecrate directory an do something like pivot-root or some initramfs-variant of chroot to get your "actual" root to replace the ramdisk.
Not quite sure of the actual details, but that seems to be the way to do what you want...


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#6 2007-09-24 12:57:10

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Install within directory

I found this interesting and decided to do some reading. I have a base i686 install within a directory inside my arch64 install that I chroot into for running 32 bit stuff. Anyway, Klixon is right. it's not that simple to do.

I think It would be a lot easier to just create a small partition and copy your install to that in order to boot into it directly.


-- archlinux 是一个极好的 linux

Offline

#7 2007-09-25 20:27:43

Notturno
Member
Registered: 2007-08-26
Posts: 18

Re: Install within directory

yeah the dedicated partition is the easiest workaround but I was curious about how it can be done as it would be useful for embedded systems.

Offline

#8 2007-09-26 10:36:33

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Install within directory

I ran across and bookmarked this page yesterday. It has a lot of info about how to use, edit, create, and general fuctions of the ramdisk/initrd.

http://www.ibm.com/developerworks/linux … nitrd.html


-- archlinux 是一个极好的 linux

Offline

Board footer

Powered by FluxBB