内核恐慌 - 创建自己的 AMI(亚马逊系统映像)

发布于 2024-09-05 21:06:55 字数 3337 浏览 5 评论 0原文

我创建了自己的 AMI 并将其注册到 Amazon EC2 上。但是在 AMI 启动时我收到以下错误:

内核恐慌 - 不同步:VFS:无法在未知块(8,1)上挂载根文件系统

映像在本地运行,没有任何问题。

fstab 包含:

proc          /proc   proc     defaults                      0 0
/dev/sda1     /       ext3     relatime,errors=remount-ro    0 1

该映像是使用以下命令创建的

ec2-bundle-image -i image.raw -r i386 -c cert-xxx.pem -k pk-xxx.pem --user 123456

完整 AMI 启动日志:

Linux version 2.6.16-xenU ([email protected]) (gcc version 4.0.1 20050727 (Red Hat 4.0.1-5)) #1 SMP Mon May 28 03:41:49 SAST 2007

BIOS-provided physical RAM map:

 Xen: 0000000000000000 - 000000006a400000 (usable)

980MB HIGHMEM available.

727MB LOWMEM available.

NX (Execute Disable) protection: active

IRQ lockup detection disabled

Built 1 zonelists

Kernel command line:  root=/dev/sda1 ro 4

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Initializing CPU#0

PID hash table entries: 4096 (order: 12, 65536 bytes)

Xen reported: 2666.666 MHz processor.

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Software IO TLB disabled

vmalloc area: ee000000-f53fe000, maxmem 2d7fe000

Memory: 1718700k/1748992k available (1958k kernel code, 20948k reserved, 620k data, 144k init, 1003528k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay using timer specific routine.. 5335.60 BogoMIPS (lpj=26678013)

Mount-cache hash table entries: 512

CPU: L1 I cache: 32K, L1 D cache: 32K

CPU: L2 cache: 6144K

Checking 'hlt' instruction... OK.

Brought up 1 CPUs

migration_cost=0

Grant table initialized

NET: Registered protocol family 16

Brought up 1 CPUs

xen_mem: Initialising balloon driver.

highmem bounce pool size: 64 pages

VFS: Disk quotas dquot_6.5.1

Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

Initializing Cryptographic API

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler deadline registered

io scheduler cfq registered

i8042.c: No controller found.

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

Xen virtual console successfully installed as tty1

Event-channel device installed.

netfront: Initialising virtual ethernet driver.

mice: PS/2 mouse device common for all mice

md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27

md: bitmap version 4.39

NET: Registered protocol family 2

Registering block device major 8

IP route cache hash table entries: 65536 (order: 6, 262144 bytes)

TCP established hash table entries: 262144 (order: 9, 2097152 bytes)

TCP bind hash table entries: 65536 (order: 7, 524288 bytes)

TCP: Hash tables configured (established 262144 bind 65536)

TCP reno registered

TCP bic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

NET: Registered protocol family 15

Using IPI No-Shortcut mode

md: Autodetecting RAID arrays.

md: autorun ...

md: ... autorun DONE.

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1) 

I have created own AMI and registered it on Amazon EC2. But while AMI startup I receive following error:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)

The image is running locally without any problems.

fstab contains:

proc          /proc   proc     defaults                      0 0
/dev/sda1     /       ext3     relatime,errors=remount-ro    0 1

The image was created with following command

ec2-bundle-image -i image.raw -r i386 -c cert-xxx.pem -k pk-xxx.pem --user 123456

Full AMI startup log:

Linux version 2.6.16-xenU ([email protected]) (gcc version 4.0.1 20050727 (Red Hat 4.0.1-5)) #1 SMP Mon May 28 03:41:49 SAST 2007

BIOS-provided physical RAM map:

 Xen: 0000000000000000 - 000000006a400000 (usable)

980MB HIGHMEM available.

727MB LOWMEM available.

NX (Execute Disable) protection: active

IRQ lockup detection disabled

Built 1 zonelists

Kernel command line:  root=/dev/sda1 ro 4

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Initializing CPU#0

PID hash table entries: 4096 (order: 12, 65536 bytes)

Xen reported: 2666.666 MHz processor.

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Software IO TLB disabled

vmalloc area: ee000000-f53fe000, maxmem 2d7fe000

Memory: 1718700k/1748992k available (1958k kernel code, 20948k reserved, 620k data, 144k init, 1003528k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay using timer specific routine.. 5335.60 BogoMIPS (lpj=26678013)

Mount-cache hash table entries: 512

CPU: L1 I cache: 32K, L1 D cache: 32K

CPU: L2 cache: 6144K

Checking 'hlt' instruction... OK.

Brought up 1 CPUs

migration_cost=0

Grant table initialized

NET: Registered protocol family 16

Brought up 1 CPUs

xen_mem: Initialising balloon driver.

highmem bounce pool size: 64 pages

VFS: Disk quotas dquot_6.5.1

Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

Initializing Cryptographic API

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler deadline registered

io scheduler cfq registered

i8042.c: No controller found.

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

Xen virtual console successfully installed as tty1

Event-channel device installed.

netfront: Initialising virtual ethernet driver.

mice: PS/2 mouse device common for all mice

md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27

md: bitmap version 4.39

NET: Registered protocol family 2

Registering block device major 8

IP route cache hash table entries: 65536 (order: 6, 262144 bytes)

TCP established hash table entries: 262144 (order: 9, 2097152 bytes)

TCP bind hash table entries: 65536 (order: 7, 524288 bytes)

TCP: Hash tables configured (established 262144 bind 65536)

TCP reno registered

TCP bic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

NET: Registered protocol family 15

Using IPI No-Shortcut mode

md: Autodetecting RAID arrays.

md: autorun ...

md: ... autorun DONE.

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1) 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暖阳 2024-09-12 21:06:55

尝试使用正确的 AKI 和 ARI 注册 AMI。

Try registering the AMI with correct AKI and ARI.

少年亿悲伤 2024-09-12 21:06:55

对于后代:
我将自己制作的 AMI 从美国东部区域复制到美国西部和欧盟区域。从该 AMI 创建实例时,我必须查找该区域的正确内核映像。
首先,我查找 us-east 内核的名称:

ec2-describe-images --headers -o amazon --filter "name=pv-grub-*.gz"
Type    ImageID Name    Owner   State   Accessibility   ProductCodes    Architecture    ImageType   KernelId    RamdiskId   Platform    RootDeviceType  VirtualizationType  Hypervisor
IMAGE   aki-659ccb0c    amazon/pv-grub-hd00_1.04-i386.gz    amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-499ccb20    amazon/pv-grub-hd00_1.04-x86_64.gz  amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-8f9dcae6    amazon/pv-grub-hd0_1.04-i386.gz amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-919dcaf8    amazon/pv-grub-hd0_1.04-x86_64.gz   amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-b2aa75db    amazon/pv-grub-hd00_1.03-i386.gz    amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-b4aa75dd    amazon/pv-grub-hd00_1.03-x86_64.gz  amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-b6aa75df    amazon/pv-grub-hd0_1.03-i386.gz amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-88aa75e1    amazon/pv-grub-hd0_1.03-x86_64.gz   amazon  available   public      x86_64  kernel              instance-store  paravirtual xen

我在 us-east 中使用的内核是 aki-b4aa75dd,其名称为 amazon/pv-grub-hd00_1.03-x86_64 .gz

然后我在 us-west 中查找内核映像:

ec2-describe-images --region us-west-1 -o amazon --filter "name=pv-grub-*.gz"   ##
IMAGE   aki-960531d3    amazon/pv-grub-hd00_1.04-i386.gz    amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-920531d7    amazon/pv-grub-hd00_1.04-x86_64.gz  amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-8e0531cb    amazon/pv-grub-hd0_1.04-i386.gz amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-880531cd    amazon/pv-grub-hd0_1.04-x86_64.gz   amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-e97e26ac    amazon/pv-grub-hd00_1.03-i386.gz    amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-eb7e26ae    amazon/pv-grub-hd00_1.03-x86_64.gz  amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-f57e26b0    amazon/pv-grub-hd0_1.03-i386.gz amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-f77e26b2    amazon/pv-grub-hd0_1.03-x86_64.gz   amazon  available   public      x86_64  kernel              instance-store  paravirtual xen

...然后告诉我 us-west 中同名的内核的内核 ID 为 aki-eb7e26ae

For posterity:
I copied an AMI that I had crafted myself from us-east region to us-west and to eu regions. When creating instances from that AMI, I had to look up the correct kernel image for that region.
First I look up the name of us-east kernel:

ec2-describe-images --headers -o amazon --filter "name=pv-grub-*.gz"
Type    ImageID Name    Owner   State   Accessibility   ProductCodes    Architecture    ImageType   KernelId    RamdiskId   Platform    RootDeviceType  VirtualizationType  Hypervisor
IMAGE   aki-659ccb0c    amazon/pv-grub-hd00_1.04-i386.gz    amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-499ccb20    amazon/pv-grub-hd00_1.04-x86_64.gz  amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-8f9dcae6    amazon/pv-grub-hd0_1.04-i386.gz amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-919dcaf8    amazon/pv-grub-hd0_1.04-x86_64.gz   amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-b2aa75db    amazon/pv-grub-hd00_1.03-i386.gz    amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-b4aa75dd    amazon/pv-grub-hd00_1.03-x86_64.gz  amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-b6aa75df    amazon/pv-grub-hd0_1.03-i386.gz amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-88aa75e1    amazon/pv-grub-hd0_1.03-x86_64.gz   amazon  available   public      x86_64  kernel              instance-store  paravirtual xen

The kernel I use in us-east is aki-b4aa75dd which has a name of amazon/pv-grub-hd00_1.03-x86_64.gz .

I then look up kernel images in us-west:

ec2-describe-images --region us-west-1 -o amazon --filter "name=pv-grub-*.gz"   ##
IMAGE   aki-960531d3    amazon/pv-grub-hd00_1.04-i386.gz    amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-920531d7    amazon/pv-grub-hd00_1.04-x86_64.gz  amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-8e0531cb    amazon/pv-grub-hd0_1.04-i386.gz amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-880531cd    amazon/pv-grub-hd0_1.04-x86_64.gz   amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-e97e26ac    amazon/pv-grub-hd00_1.03-i386.gz    amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-eb7e26ae    amazon/pv-grub-hd00_1.03-x86_64.gz  amazon  available   public      x86_64  kernel              instance-store  paravirtual xen
IMAGE   aki-f57e26b0    amazon/pv-grub-hd0_1.03-i386.gz amazon  available   public      i386    kernel              instance-store  paravirtual xen
IMAGE   aki-f77e26b2    amazon/pv-grub-hd0_1.03-x86_64.gz   amazon  available   public      x86_64  kernel              instance-store  paravirtual xen

...then tells me that the kernel with the same name in us-west has a kernel ID of aki-eb7e26ae .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文