From: chloe K on
Hi all

I install etch in hda
then I add the hdc which have same partition but not same size in hda

/dev/hda1 /boot
/dev/hda2 /swap
/dev/hda3 /

i use rsync to copy data from hda to hdc

I use fedora5 boot disk to boot.
mount /boot and / and chroot to /
but I got error to grub-install /dev/hda

You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!
tempnam: No such file or directory
/usr/sbin/grub-install: line 394: $log_file: ambigous redirect

What is the problem?

Thank you








---------------------------------
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail
From: Andrew Sackville-West on
On Tue, Dec 04, 2007 at 02:56:57PM -0500, chloe K wrote:
> Hi all
>
> I install etch in hda
> then I add the hdc which have same partition but not same size in hda
>
> /dev/hda1 /boot
> /dev/hda2 /swap
> /dev/hda3 /
>
> i use rsync to copy data from hda to hdc
>
> I use fedora5 boot disk to boot.
> mount /boot and / and chroot to /

did you mount /boot within the chroot?

> but I got error to grub-install /dev/hda
>
> You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!
> tempnam: No such file or directory
> /usr/sbin/grub-install: line 394: $log_file: ambigous redirect

what actual command did you enter?

A
From: Bob on
chloe K wrote:
> Hi all
>
> I install etch in hda
> then I add the hdc which have same partition but not same size in hda
>
> /dev/hda1 /boot
> /dev/hda2 /swap
> /dev/hda3 /
>
> i use rsync to copy data from hda to hdc
>
> I use fedora5 boot disk to boot.
> mount /boot and / and chroot to /
> but I got error to grub-install /dev/hda
>
> You shouldn't call /sbin/grub-install. Please call
> /usr/sbin/grub-install instead!
> tempnam: No such file or directory
> /usr/sbin/grub-install: line 394: $log_file: ambigous redirect
>
> What is the problem?
>
> Thank you

I do this all the time though usually I'm copying my nice clean install
onto a drive for a second machine but I run grub install from knoppix
after I move the drive [0] with a command like.

mount -o dev,rw /dev/hda2
chroot /mnt/hda2
grub
root (hd0,1) # or (hd0,0) for hda1 and probably hd2,0 for hdc1
setup (hd0)
quit

grub --config-file=./boot/grub/menu.lst --boot-drive=/dev/hda --batch
grub-install

you could try a modified set of those commands, after you've copied the
files over I'd be tempted to pull /dev/hda so you know the second drive
is working independently, it's easy to think you've got it working when
actually grub on hdc is booting the OS in hda1.

On a side note I tend to use file system labels now rather than
partition numbers as then if you have 2 IDE chipsets and they get picked
up in a different order it doesn't matter, if you do that you must
remember to relabel your partitions on hdc as I'm not sure what happens
if you have 2 partitions of the same name.

[0] I could use dd if=/dev/hda of=/dev/hdc bs=446 count=1 to copy the
boot sector but not the partition table)


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: chloe K on


Andrew Sackville-West <andrew(a)farwestbilliards.com> wrote: On Tue, Dec 04, 2007 at 02:56:57PM -0500, chloe K wrote:
> Hi all
>
> I install etch in hda
> then I add the hdc which have same partition but not same size in hda
>
> /dev/hda1 /boot
> /dev/hda2 /swap
> /dev/hda3 /
>
> i use rsync to copy data from hda to hdc
>
> I use fedora5 boot disk to boot.
> mount /boot and / and chroot to /

did you mount /boot within the chroot?


Yes, I did


> but I got error to grub-install /dev/hda
>
> You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!
> tempnam: No such file or directory
> /usr/sbin/grub-install: line 394: $log_file: ambigous redirect

what actual command did you enter?


grub-install /dev/hda




---------------------------------
All new Yahoo! Mail -
---------------------------------
Get a sneak peak at messages with a handy reading pane.
From: Andrew Sackville-West on
On Wed, Dec 05, 2007 at 09:43:16AM -0500, chloe K wrote:
>
>
> Andrew Sackville-West <andrew(a)farwestbilliards.com> wrote: On Tue, Dec 04, 2007 at 02:56:57PM -0500, chloe K wrote:
> > Hi all
> >
> > I install etch in hda
> > then I add the hdc which have same partition but not same size in hda
> >
> > /dev/hda1 /boot
> > /dev/hda2 /swap
> > /dev/hda3 /
> >
> > i use rsync to copy data from hda to hdc
> >
> > I use fedora5 boot disk to boot.
> > mount /boot and / and chroot to /
>
> did you mount /boot within the chroot?

hmmm... what about the rest of the file system? Is / all on one
partition? What are the permissions on /tmp? and does /bin exist at
this point?

>
>
> Yes, I did
>
>
> > but I got error to grub-install /dev/hda
> >
> > You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!
> > tempnam: No such file or directory
> > /usr/sbin/grub-install: line 394: $log_file: ambigous redirect
>
> what actual command did you enter?
>
>
> grub-install /dev/hda
>

I looked at the code and the issue is $log_file, which gets set early
on but could be changed in a number of circumstances. But they all
center around the use of /tmp and /bin/tempfile. I think somehow
you're getting a null $log_file and thus causing this ambiguous
redirect.

I'm not sh pro by any stretch, so ymmv.

A