LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-02-2005, 05:29 PM   #1
PhuckFonix
Member
 
Registered: Mar 2004
Location: United States of Bush
Distribution: Knoppix 3.7, Debian Sarge
Posts: 297

Rep: Reputation: 30
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?

Last edited by PhuckFonix; 05-02-2005 at 05:40 PM.
 
Old 05-02-2005, 06:04 PM   #2
liquidtenmilion
Member
 
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606

Rep: Reputation: 32
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
 
Old 05-02-2005, 07:08 PM   #3
PhuckFonix
Member
 
Registered: Mar 2004
Location: United States of Bush
Distribution: Knoppix 3.7, Debian Sarge
Posts: 297

Original Poster
Rep: Reputation: 30
Thanks, that did it!
 
Old 05-02-2005, 09:15 PM   #4
Intimidator
Member
 
Registered: Mar 2005
Distribution: FC4
Posts: 83

Rep: Reputation: 15
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

Last edited by Intimidator; 05-02-2005 at 09:16 PM.
 
  


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
chroot problem rjkfsm Linux - Software 1 07-19-2005 10:46 AM
chroot problem bruse Linux - Security 3 07-04-2005 06:57 AM
problem with chroot ef_ Linux - Security 6 10-14-2004 06:46 AM
I have a problem with chroot. vintermann Linux - Software 2 01-31-2004 07:57 AM
Chroot problem lokiz Linux - Networking 2 06-14-2001 09:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration