更改 initramfs 脚本

更改 initramfs 脚本

mdadm'我通过位于 dmraid 上的分区创建了 RAID 0威盛 VT6421和 Western Digital 硬盘。在该 RAID 上安装了 Ubuntu。现在,当我启动时,我得到了(initramfs)ash 提示。

我必须写

mdadm --stop /dev/md1
mdadm --assemble --scan

然后按Ctrl+D恢复。然后 Ubuntu 正常加载。

我想改变这种行为以节省我的时间。因此,我需要更改位于/scripts初始 ramdisk 目录中的某些脚本。但我所知道的initramfs只是它是经过 gzip 压缩的。我查看了update-initramfs但还没有找到线索。此外,除非我知道自己在做什么,否则我担心会在那里做某事。

我如何更改我的 initramfs 脚本?

UPD:现在我知道我应该

gunzip -c initrd.img-3.13.0-24-generic | cpio -id

然后进行更改并重新创建

find . | cpio -o | gzip -c >/boot/initrd.new.img-3.13.0-24-generic

但我仍然不知道应该编辑哪些脚本。

更新2:sudo parted -l

$ sudo parted -l
Model: JetFlash Transcend 32GB (scsi)
Disk /dev/sda: 32,1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End     Size    Type     File system  Flags
 1      131kB  32,1GB  32,1GB  primary  fat32        boot, lba


Model: WD My Passport 074A (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1000GB  1000GB  primary  ntfs


Model: ATA WDC WD1600JS-22M (scsi)
Disk /dev/sdc: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system     Flags
 1      1049kB  160GB  160GB  primary  linux-swap(v1)


Error: Can't have a partition outside the disk!                           

Model: ATA WDC WD5000AAKS-0 (scsi)
Disk /dev/sde: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags


Error: /dev/mapper/via_ecedbfaihb6: unrecognised disk label               

Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/via_ecedbfaihb5: 524MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End    Size   File system  Flags
 1      0,00B  524MB  524MB  ext4


Error: Can't have a partition outside the disk!                           

Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/via_ecedbfaihb2: 167GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End    Size   File system  Flags
 1      0,00B  167GB  167GB  ntfs


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/via_ecedbfaihb1: 367MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End    Size   File system  Flags
 1      0,00B  367MB  367MB  ntfs


Error: Can't have a partition outside the disk!                           

Model: Linux Software RAID Array (md)
Disk /dev/md1: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  6494MB  6493MB  primary  linux-swap(v1)
 2      6494MB  27,5GB  21,0GB  primary  ext4
 3      27,5GB  320GB   293GB   primary  ext4

转录:

  • /dev/sda其中/dev/sdb每 500GB 都以 fakeraid 命名via_ecedbfaihb
  • Win8.1 保留分区via_ecedbfaihb1(390MB),
  • Win 8.1 系统分区via_ecedbfaihb2(160GB),
  • 扩展分区via_ecedbfaihb3
  • Linux 启动分区via_ecedbfaihb5(500MB),
  • mdadm 第一个分区via_ecedbfaihb6(159GB),
  • 数据分区via_ecedbfaihb7剩余空间
  • /dev/sdc1mdadm 第二个分区(159GB),
  • /dev/md1由 via_ecedbfaihb6 和 sdc1 组成,
  • /dev/md1p1交换(6GB),
  • /dev/md1p2扩展,
  • /dev/md1p5根 (20GB),
  • /dev/md1p6主页 (~300GB)

相关内容