Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
the case of the invisble /boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
slais-sysweb
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 221
Location: London

PostPosted: Fri Jul 26, 2002 7:29 am    Post subject: the case of the invisble /boot Reply with quote

After a disk failure I reinstalled Gentoo, to rebuild a boot partition. I now have a boot partition, and I can boot, but if I mount the partition in Gentoo the contents are invisible. The files are there, I can mount the partition from SuSE on the same machine, (I copied the new kernel to the partition using SuSE), and Grub will boot both SuSE and Gentoo but when /boot is mounted under Gentoo ls -al shows only . and ..

before mounting
Code:

drwxr-xr-x    2 root     root         4096 Jul 25 21:45 boot
root@ordior djc # mount /dev/sda1 /boot
drwxr-xr-x   17 root     root         4096 Jul 25 21:57 .
drwxr-xr-x   17 root     root         4096 Jul 25 21:57 ..
drwxr-xr-x    2 root     root         4096 Jul 25 08:46 bin
drwxr-xr-x    2 root     root        16384 Jan  1  1970 boot
drwxr-xr-x    1 root     root            0 Jan  1  1970 dev
drwxr-xr-x   40 root     root         4096 Jul 26 07:02 etc
drwxr-xr-x    5 root     root         4096 Jul 25 21:42 home
drwxr-xr-x    6 root     root         4096 Jul 25 08:50 lib
drwx------    2 root     root        16384 Jun 11 22:04 lost+found
drwxr-xr-x    6 root     root         4096 Jun 12 22:12 mnt
drwxr-xr-x    5 root     root         4096 Jul 25 01:24 opt
dr-xr-xr-x   40 root     root            0 Jul 26 06:43 proc
drwx------    4 root     root         4096 Jul 25 01:24 root
drwxr-xr-x    2 root     root         4096 Jul 25 08:59 sbin
drwxrwxrwt    5 root     root         4096 Jul 26 06:45 tmp
drwxr-xr-x   14 root     root         4096 Jul 25 01:24 usr
drwxr-xr-x   11 root     root         4096 Jul 25 01:24 var
root@ordior djc # ls -al /boot
total 20
drwxr-xr-x    2 root     root        16384 Jan  1  1970 .
drwxr-xr-x   17 root     root         4096 Jul 25 21:57 ..


Originally I had three disks with sda8 gentoo/boot, sdb6 gentoo/, sdc1 SuSE/boot, sdc2 SuSE/root sdc3 Swap. There was a WinNT installation on sda1 with additional NTFS and FAT partitions on sda and sdb. Grub booted from hd0 (ie sda) After sda failed I reinstalled Gentoo by creating a new Gentoo/boot partion on the second disk (ie was sdb1 now sda1) and a new Gentoo/ on the third disk (unused space on what was sdc now sdb5). After install I could use the new installation to change the partition tables of SuSE (now sdb2) and the old Gentoo/ (now sda6) I then changed menu.lst so that Grub could load the old Gentoo/ using the new /boot (sda1). I then compiled a kernel for the old installation at which point I discoved the difficulty of mounting /boot to install the kernel. I worked around this by using SuSE which has no problems reading sda1, no obviously does Grub.
So, where did I go wrong? I have tried fsck and there are no problems. I thought the link to . from boot in /boot might be the problem, but removing that didn't do anything. I may try copying the contents of /boot under SuSE, remaking the sda1 partion and writing the files back, any other suggestions.
[code]
/etc/fstab
/dev/sda1 /boot ext2 noauto,noatime 1 1
/dev/sda6 / ext3 noatime 0 0
/dev/sdb3 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
proc /proc proc defaults 0 0
[code]

[/code]
_________________
--
djc
sysweb SLAIS UCL
Back to top
View user's profile Send private message
slais-sysweb
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 221
Location: London

PostPosted: Fri Jul 26, 2002 7:32 am    Post subject: ps Reply with quote

Note also that lost+found appears to contain a large file but that this like /boot appear to have been made invisible to ls
_________________
--
djc
sysweb SLAIS UCL
Back to top
View user's profile Send private message
kachaffeous
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jun 2002
Posts: 86

PostPosted: Fri Jul 26, 2002 11:36 am    Post subject: Reply with quote

are the files there if you unmount /boot and do a ls?
Back to top
View user's profile Send private message
fghellar
Bodhisattva
Bodhisattva


Joined: 10 Apr 2002
Posts: 856
Location: Porto Alegre, BR

PostPosted: Fri Jul 26, 2002 6:18 pm    Post subject: Reply with quote

Try to mount it with only 'mount /boot'.
_________________
| www.gentoo.org | www.tldp.org | www.google.com |
Back to top
View user's profile Send private message
slais-sysweb
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 221
Location: London

PostPosted: Fri Jul 26, 2002 8:40 pm    Post subject: success Reply with quote

thanks
mount /boot worked! :D

but can you explain why :?:
_________________
--
djc
sysweb SLAIS UCL
Back to top
View user's profile Send private message
fghellar
Bodhisattva
Bodhisattva


Joined: 10 Apr 2002
Posts: 856
Location: Porto Alegre, BR

PostPosted: Fri Jul 26, 2002 8:59 pm    Post subject: Reply with quote

See here...

You said there was a Windows partition where now is your boot partition... If you did not manually "zero it out", there's still some data left there, and that data was being used by mount to guess the partition type. It was probably mounting it as ntfs...
_________________
| www.gentoo.org | www.tldp.org | www.google.com |
Back to top
View user's profile Send private message
slais-sysweb
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 221
Location: London

PostPosted: Sat Jul 27, 2002 10:22 am    Post subject: Reply with quote

ok, so how would I 'zero it out'

BTW (OT), I promised myself when the drive failed I would not be reinstalling NT (or any other windows) so this is now a windows free machine.
AAT (OT), Thought I'd check if the failed drive was still under warranty, looked up the original invoice: failed five years to the day after i bought it -- ah well.
_________________
--
djc
sysweb SLAIS UCL
Back to top
View user's profile Send private message
nitro322
Guru
Guru


Joined: 24 Jul 2002
Posts: 594
Location: USA

PostPosted: Sat Jul 27, 2002 10:52 am    Post subject: Reply with quote

one other suggestion... I had a similar problem after installing Gentoo. It'd boot fine, but then for some reason my /boot partition was never mounted while the system was actually running despite adding the exactly as specified in the installation guide (just like you, judgeing by the noatime and noauto options). After quickly getting tired of manually mounting it everytime, I removed the noauto option from my fstab file. Worked fine after that.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sat Jul 27, 2002 12:11 pm    Post subject: Reply with quote

/boot is not mounted by default so that you can't hurt it during normal usage. You should only need to have it mounted when baking new kernels.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
fghellar
Bodhisattva
Bodhisattva


Joined: 10 Apr 2002
Posts: 856
Location: Porto Alegre, BR

PostPosted: Sun Jul 28, 2002 5:02 am    Post subject: Reply with quote

slais-sysweb wrote:
ok, so how would I 'zero it out'

You can do it with something like
Code:
dd if=/dev/zero of=/dev/hda1

But be careful! This is dangerous! One little mistake and you can lose all your data. 'man dd' for more info...
_________________
| www.gentoo.org | www.tldp.org | www.google.com |
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum