hns - 日記自動生成システム - Version 2.19.9

先月 2009年05月 来月
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2009年05月06日(水) 旧暦 [n年日記] [更新:"2009/05/07 11:44:03"]

#1 [NetBSD] KuroBox Pro now boots automatically from disk

On 2009/05/04 , I wrote
(7) PROBLEM
* Can't Boot stand alone for now.
Currently bootp server is necessary. Ext2fs and uImage may be one of the work around.
This is now resolved. The points will be
  1. Have Native Linux partition (131 = 0x83) by using fdisk
  2. By using mkfs.ext2 from pkgsrc/e2fsprogs, make file system
    /usr/pkg/sbin/mkfs.ext2 /dev/wd0h
    
  3. place netbsd-arm.bin (by objcopy -O binary) under its ext2fs partition
  4. (in u-boot environment) set bootcmd variable as
     setenv bootcmd 'ide reset; ext2load ide 0:4 8000 /netbsd-arm.bin; go 8000'
    
    (saveenv to save above setup permanently after the setup confirmed correct.)
That's it, I believe.

The first of all, I selected 'Use the Entire disk' at original sysinst installation. The last partition was for /export and I might have newfs even after installation to make room for small boot area. So I decided to divide the last partition into /export and another fdisk area.

...
total sectors: 156301488
...
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   2015937        63     4.2BSD   1024  8192     0  # (Cyl.      0*-   1999)
 b:   2016000   2016000       swap                     # (Cyl.   2000 -   3999)
 c: 156240000         0     unused      0     0        # (Cyl.      0 - 154999)
 e:  14112000   4032000     4.2BSD   2048  8192     0  # (Cyl.   4000 -  17999)
 f:  10080000  18144000     4.2BSD   2048  8192     0  # (Cyl.  18000 -  27999)
 g: 128016000  28224000     4.2BSD   2048  8192     0  # (Cyl.  28000 - 154999)
 h:     61488 156240000     4.2BSD      0     0     0  # (Cyl. 155000 - 155060)
See, the 'h' partition is outside of 'c'. fstype 4.2BSD was necessary to issue newfs (mkfs.ext2) from NetBSD environment. Original size of c was 15631488.
  156301488	original size of 'c'
-     61488	room for fdisk #3
  ---------
  156240000	the size of 'c' after shrink
fdisk looks below: ( 'fdisk -u wd0' to update (modify) the size of partition.)
kuroarm# fdisk wd0
fdisk: Cannot determine the number of heads
Disk: /dev/rwd0c
NetBSD disklabel disk geometry:
cylinders: 155061, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 156301488

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 156301488

Partition table:
0: NetBSD (sysid 169)
    start 63, size 156239937 (76289 MB, Cyls 0-9725/124/63), Active
1: <UNUSED>
2: <UNUSED>
3: Linux native (sysid 131)
    start 156240000, size 61488 (30 MB, Cyls 9725/125/1-9729/80/63)
First active partition: 0
kuroarm# 
In ext2fs file system, the kernel is placed.
kuroarm# mount -t ext2fs /dev/wd0h /mnt
kuroarm# ls -l /mnt
total 9941
drwx------  2 root    wheel    12288 May  6 19:09 lost+found
-rwxr-xr-x  1 makoto  wheel  5061572 May  4 17:26 netbsd-arm.bin
kuroarm# 
dmesg for 5.99.01
Even with this setup, naturally, the human intervension required as:
boot device: <unknown>
root device: wd0a
...
init path (default /sbin/init):  (Return)
So I may need to re-config the kernel or have some setup to pass the booting PATH to the kernel.

pkgsrc related::

I have a problem making digest-20080510.
kuroarm# cd /export/pkgsrc/pkgtools/digest/
kuroarm# make
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/download-vulnerability-list'.
===> Configuring for digest-20080510
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... ./config.guess: 772: Syntax error: Missing `)'
configure: error: cannot guess build type; you must specify one
*** Error code 1

Stop.
make: stopped in /export/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
make: stopped in /export/pkgsrc/pkgtools/digest
kuroarm# 
So I did:
export PKG_PATH=ftp://ftp.jp.netbsd.org/pub/pkgsrc/packages/NetBSD/arm/5.0/All
pkg_add digest

Suggestion for sysinst:

You probably need to select 'Edit the MBR partition table' at sysinst MENU (sorry for the text in Japanese).



最近の日記
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)