$ dd if=/dev/zero of=uml_gentoo_st3_20120605 bs=1048576 count=1024
1024+0 レコード入力
1024+0 レコード出力
1073741824 バイト (1.1 GB) コピーされました、 1.25505 秒、 856 MB/秒
$ mke2fs -j uml_gentoo_st3_20120605
mke2fs 1.41.12 (17-May-2010)
uml_gentoo_st3_20120605 is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
$ su
Password:
# mount -t ext3 -o loop uml_gentoo_st3_20120605 /mnt/target
# cd /mnt/target
# tar -xjpf ~admin/stage3-amd64-20130130.tar.bz2
# ls
bin dev home lib32 lost+found mnt proc run sys usr
boot etc lib lib64 media opt root sbin tmp var
#
# su admin
$ mkdir ~/.ssh
$ cd !!:1
$ ssh-keygen -t rsa -f uml_admin
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in uml_admin.
Your public key has been saved in uml_admin.pub.
The key fingerprint is:
eb:57:3a:**:**:**:**:**:**:**:**:**:e2:ff:fb:67 admin@phenom
The key's randomart image is:
+--[ RSA 2048]----+
| |
| o.*o+.o + E |
| . .=Xo.+=.+ |
+-----------------+
$ ls
uml_admin uml_admin.pub
$ cat uml_admin.pub > authorized_keys
$ chmod 600 authorized_keys
$
scripts/kconfig/mconf arch/x86/um/Kconfig
#
# configuration written to .config
#
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
$ make CC=gcc NM=nm AR=ar LD=ld OBJCOPY=objcopy ARCH=um
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig arch/x86/um/Kconfig
〜
LD [M] drivers/net/slip/slhc.ko
CC drivers/net/slip/slip.mod.o
LD [M] drivers/net/slip/slip.ko
CC drivers/net/tun.mod.o
LD [M] drivers/net/tun.ko
CC fs/autofs4/autofs4.mod.o
LD [M] fs/autofs4/autofs4.ko
CC fs/binfmt_misc.mod.o
LD [M] fs/binfmt_misc.ko
CC fs/isofs/isofs.mod.o
LD [M] fs/isofs/isofs.ko
CC sound/soundcore.mod.o
LD [M] sound/soundcore.ko
$ ls -l linux
-rwxr-xr-x 2 deer wheel 43645642 Mar 5 23:08 linux
$
linux という実行形式ファイルができています
これが UMLで動作する Linuxカーネル本体です
$ ~/linux-3.7.8/linux ubd0=~/uml_gentoo_st3_20120605 eth0=tuntap,tap0 mem=96M
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...OK
Checking PROT_EXEC mmap in /dev/shm/...OK
Checking for the skas3 patch in the host:
〜
* Initializing random number generator ...
[ ok ]
INIT: Entering runlevel: 3
* Bringing up interface eth0
* 192.168.255.254 ...
[ ok ]
* Adding routes
* default via 192.168.255.1 ...
[ ok ]
* Mounting network filesystems ...
[ ok ]
* Generating dsa host key ...
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
e2:da:53:06:1e:d5:97:b9:6e:e1:3a:94:4c:4c:9a:48 root@localhost
The key's randomart image is:
+--[ DSA 1024]----+
| . o |
| E . o + |
| . o = . . |
| + o o o |
| ..oSo + . |
| ...o + + |
| .o . o |
| o. o |
| . .. . |
+-----------------+
[ ok ]
* Generating rsa host key ...
Generating public/private rsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
6e:f1:ea:e7:bc:23:f1:d5:78:f7:4d:88:a5:a9:b3:a1 root@localhost
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| . |
| S B . |
| ..o * + o|
| oooo . oo|
| ..+*. o|
| .E+== |
+-----------------+
[ ok ]
* Starting sshd ...
[ ok ]
* Starting local
bash: no job control in this shell
$ ssh -i uml_admin admin@192.168.255.254
The authenticity of host '192.168.255.254 (192.168.255.254)' can't be established.
RSA key fingerprint is 6e:f1:ea:**:**:**:**:**:**:**:**:**:**:a9:b3:a1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.255.254' (RSA) to the list of known hosts.
Password:
admin@localhost ~ $
‘g_uri_unescape_string’ was not declared in this scope と怒られました
g_uri_unescape_string() 関数とは Glib で提供されていた関数で
文字列中のエスケープ文字を処理する機能を提供するようです
最近の Glib のバージョンのためか 現在はこの機能が削除されたのでしょう
91 cur_track_address += track_length;
92
93 /* track start address may be even-number.
94 I found a troube at following environment.
95 (MIXED-MODE)
96 track01 start=-150 length=3743(sectors) AUDIO (2352bytes/sector)
97 track02 start=3593 length=45336(sectors) BINARY (2048bytes/sector)
98 track03 start=48929 length=2925(sectors) AUDIO (2352bytes/sector)
99 ...
100 track02(DATA) start sector is just 3593, but Linux? set ioctl() start a ddress 3592 (-1).
101 So, CDemu is going to access to "track01" and fails.
102 (Because CDemu fails to access to 2352bytes/sector at current version.)
103 */
104 if ( cur_track_address % 2 ) cur_track_address++;
105 }
106
107 return TRUE;