Subject: Re: drobne postrehy - 2.0rc5 amd64
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: netbsd <netbsd@eq.cz>
List: regional-cs
Date: 12/05/2004 23:32:07
Jaromir Dolecek wrote:
> Rad bych krok za krokem prosel postup, aby se vyloucila
> moznost nejakeho mezikroku, ktery muze zpusobovat ten problem.

Ok, delal jsem to uplne presne tak, ted jsem to pro jistotu provedl 
jeste oboji dvakrat, stale se stejnymi vysledky. Na zacatku je system 
bez chyb, pred testy jsem vzdy nabootoval 'boot netbsd -s' a provedl 
fsck, jak je uvedeno.


> 1. boot -s
> Pri nabootovani do singleuser se objevi:
> Enter pathname of shell or RETURN for /bin/sh:
> 
> Tady date <enter>, objevi se root prompt:
> #
> 2. fsck -f
> 
> Nyni date
> # fsck -fy /
> 
> Vypise to neco jako:
> ** /dev/rwd0a
> ** File system is already clean
> ** Last Mounted on /
> ** Phase 1 - Check Blocks and Sizes
> ...
> 
> fsck projde disk a najde nebo nenajde chyby.
> 3. nabootovani multiuser
> 
> Na promptu date 
> # exit
> a system normalne nabootuje do normalniho provozu, objevi se login
> prompt:
> 
> NetBSD/i386 (jmeno) (console)

NetBSD/amd64 :-)

> 
> login:
> 
> 4. nalogujete se a rozbalite archiv
> 
> mkdir /tmp/pkgsrc
> cd /tmp/pkgsrc
> tar xf ..../pkgsrc.tar.gz
> 
> 5. reboot systemu
> 
> bez jakychkoli dalsich operaci prebootujete system
> pomoci 'shutdown -r now' a nabootujete do singleuser modu pomoci
> boot -s.

mkdir /tmp/pkgsrc
cd /tmp/pkgsrc
cp ~/pkgsrc.tar.gz ./
tar -xzf pkgsrc.tar.gz
shutdown -r now

Na boot promptu 'boot netbsd -s'

> 
> 6. fsck -f rootu
> 
> Po promptu:
> 
> Enter pathname of shell or RETURN for /bin/sh:
> 
> opet date <enter> a zadate:
> 
> # fsck -fy /
> 
> V tuto chvili by fsck nemel zahlasit zadne chyby. Pokud zahlasi,
> prosim poslete mi vystup z prikazu mount -vvv.

Bez softdeps zatim vzdy nasel chyby na /.

Jeste pripomenu, ze to dela i s jadrem i386 z live cd, jak jsem psal. To 
na zacatku byl fs v poradku, zadne namontovane disky. Dal jsem:

fsck -fy /dev/rwd0a

Vsecko v poradku.

mount /dev/wd0a /var/mnt/wd0a
cd /var/mnt/wd0a/tmp/pkgsrc
cp /var/mnt/wd0a/root/pkgsrc.tar.gz ./
tar -xzf pkgsrc.tar.gz
cd /var/mnt
umount wd0a
fsck -fy /dev/rwd0a

Najde a opravi chyby.

mount -o softdep /dev/wd0a /var/mnt/wd0a
cd /var/mnt/wd0a/tmp/pkgsrc
rm -rf pkgsrc
tar -xzf pkgsrc.tar.gz
cd /var/mnt
umount wd0a
fsck -fy /dev/rwd0a

Bez chyb.

Testy jsem takto opakoval nekolikrat, vysledek je postupem zrejme 
determinovan :-)


'mount -vvv' bez softdep:

23:11:03 root@tyan:~# mount -vvv
/dev/wd0a on / type ffs (local, root file system, writes: sync 11 async 29)
/dev/wd0e on /var type ffs (local, writes: sync 174 async 11)
/dev/wd0f on /usr type ffs (local, writes: sync 2 async 11)
kernfs on /kern type kernfs (local, writes: sync 0 async 0)
23:11:07 root@tyan:~# mkdir /tmp/pkgsrc
23:11:16 root@tyan:~# cd /tmp/pkgsrc/
23:11:20 root@tyan:/tmp/pkgsrc# cp ~/pkgsrc.tar.gz ./
23:11:25 root@tyan:/tmp/pkgsrc# tar -xzf pkgsrc.tar.gz
tar: Access/modification time set failed on: 
pkgsrc/lang/perl5/patches/CVS (No such file or directory)
tar: Access/modification time set failed on: pkgsrc/lang/perl5/patches 
(No such file or directory)
23:13:43 root@tyan:/tmp/pkgsrc# mount -vvv
/dev/wd0a on / type ffs (local, root file system, writes: sync 402088 
async 2973)
/dev/wd0e on /var type ffs (local, writes: sync 174 async 20)
/dev/wd0f on /usr type ffs (local, writes: sync 2 async 20)
kernfs on /kern type kernfs (local, writes: sync 0 async 0)
23:17:40 root@tyan:/tmp/pkgsrc# shutdown -r now

=> fsck v single najde chyby

se softdep:

23:23:42 root@tyan:~# mount -vvv
/dev/wd0a on / type ffs (soft dependencies, local, root file system, 
writes: sync 2 async 33)
/dev/wd0e on /var type ffs (local, writes: sync 174 async 18)
/dev/wd0f on /usr type ffs (local, writes: sync 2 async 17)
kernfs on /kern type kernfs (local, writes: sync 0 async 0)
23:23:53 root@tyan:~# mkdir /tmp/pkgsrc
23:24:04 root@tyan:~# cd /tmp/pkgsrc/
23:24:09 root@tyan:/tmp/pkgsrc# cp ~/pkgsrc.tar.gz ./
23:24:17 root@tyan:/tmp/pkgsrc# tar -xzf pkgsrc.tar.gz
23:24:50 root@tyan:/tmp/pkgsrc# mount -vvv
/dev/wd0a on / type ffs (soft dependencies, local, root file system, 
writes: sync 4653 async 29093)
/dev/wd0e on /var type ffs (local, writes: sync 174 async 18)
/dev/wd0f on /usr type ffs (local, writes: sync 2 async 19)
kernfs on /kern type kernfs (local, writes: sync 0 async 0)
23:24:59 root@tyan:/tmp/pkgsrc# shutdown -r now

=> fsck v single nenajde chyby

r.