You are not logged in.

#1 2005-01-20 13:41:54

Zym0tiC
Member
Registered: 2004-01-17
Posts: 40
Website

chroot works but no devices

after a reinstall of linux I lost my grub loader in the MBR.
This is what I did but it doesn't work:

mount /discs/disc0/part5 /mnt/linux
chroot /mnt/linux
grub-install /discs/disc0/disc

After that I get an error about not having a block device
In my /dev dir i only see: console zero null

Don't know what's wrong, all the other times i re-installed grub/lilo it doesn't happens?

Offline

#2 2005-01-20 16:19:23

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,751

Re: chroot works but no devices

try

mount /dev/discs/disc0/part /mnt/linux

HTH


Mr Green

Offline

#3 2005-01-20 17:14:27

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: chroot works but no devices

Well, you just don't have /mnt/linux/dev populated. Instead of chrooting, just call grub-install with --root-directory, i.e. grub-install --root-directory=/mnt/linux /dev/discs/disc0/disc

Cheers,

lucke

Offline

#4 2005-01-21 01:08:44

kth5
Member
Registered: 2004-04-29
Posts: 655
Website

Re: chroot works but no devices

you need to mount /proc and /dev before any bootloader install in a chrooted enviroment will work.

chroot  /new/root
mount -t proc proc /proc
mount -t devfs devfs /dev
...

"..." is for your bootloader's install procedure.


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#5 2005-01-21 16:11:45

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: chroot works but no devices

@kth5: ...those....eye....brows....

Offline

#6 2005-01-21 16:16:27

kth5
Member
Registered: 2004-04-29
Posts: 655
Website

Re: chroot works but no devices

phrakture wrote:

@kth5: ...those....eye....brows....

furi... kuri...


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#7 2005-01-23 14:18:35

Zym0tiC
Member
Registered: 2004-01-17
Posts: 40
Website

Re: chroot works but no devices

kth5 wrote:

you need to mount /proc and /dev before any bootloader install in a chrooted enviroment will work.

chroot  /new/root
mount -t proc proc /proc
mount -t devfs devfs /dev
...

"..." is for your bootloader's install procedure.

thanx with this on I can load my devfs smile
but after running grub-install /dev/discs/disc0/disc i get an error like: /dev/discs/disc0/disc does not have any corresponding BIOS drive.

[edit]Got it! After running:
grub
root (hd0,4)  <my linux partition
setup (hd0)
quit
reboot everything was fine smile

Offline

Board footer

Powered by FluxBB