LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Chroot problem (https://www.linuxquestions.org/questions/linux-newbie-8/chroot-problem-319494/)

PhuckFonix 05-02-2005 05:29 PM

Chroot problem
 
I am trying to do commands from Knoppix 3.7 into Debian Sarge and I get the following errors for all writing operations:

Code:

knoppix@ttyp1[knoppix]$ su
root@ttyp1[knoppix]# chroot /mnt/hda5/
Knoppix:/# grub-install /dev/hda
rm: cannot remove `/boot/grub/stage1': Read-only file system

Also, now when I mounted the drive with extra user,rw in fstab, I get:

Code:

chroot /mnt/hda5 /bin/bash
root@Knoppix:/# grub-install /dev/hda
/sbin/grub-install: line 477: /dev/null: Permission denied
/sbin/grub-install: line 479: /dev/null: Permission denied
/sbin/grub-install: line 477: /dev/null: Permission denied
/sbin/grub-install: line 479: /dev/null: Permission denied
/sbin/grub-install: line 477: /dev/null: Permission denied
/sbin/grub-install: line 479: /dev/null: Permission denied
/sbin/grub-install: line 477: /dev/null: Permission denied
/sbin/grub-install: line 479: /dev/null: Permission denied
/sbin/grub-install: line 477: /dev/null: Permission denied
/sbin/grub-install: line 479: /dev/null: Permission denied
The file /boot/grub/stage1 not read correctly.
root@Knoppix:/#

What could be the problem?

liquidtenmilion 05-02-2005 06:04 PM

I would try this.

start knoppix with knoppix26 2, then log in as root.

then type mkdir /mnt/debian
then type mount /dev/hda5 /mnt/debian
then type chroot /mnt/debian
then type grub

then type root (hd0,4)
setup (hd0)
quit

then restart

PhuckFonix 05-02-2005 07:08 PM

Thanks, that did it!

Intimidator 05-02-2005 09:15 PM

To find the root partition,@ the grub prompt

grub> find /boot/grub/stage1
or
grub> find /grub/stage1

It will return something like hd(0,8)

grub> root (hd0,8)
grub> setup (hd0,8)

The above 2 cmds have been discussed in the previous posts,Just giving them for the sake of completion.

BTW,u will be getting the grub prompt by just typing typing 'grub' @ the command prompt :)


All times are GMT -5. The time now is 12:54 PM.