Difference between revisions of "Archboot (简体中文)"

From ArchWiki
Jump to: navigation, search
m (Archboot的发布)
(Archboot的发布)
Line 8: Line 8:
 
* 它不依赖于任何文件系统,只能运行在内存中,因此需要你有足够的内存。
 
* 它不依赖于任何文件系统,只能运行在内存中,因此需要你有足够的内存。
 
{{bc|pacman -S archboot}}
 
{{bc|pacman -S archboot}}
 +
{{TranslationStatus|Archboot|2012-08-25|219396}}
 
==Archboot的发布==
 
==Archboot的发布==
* 这些文件不是由Arch Linux官方发布。
 
* 请风险自担。
 
 
* 提供ISO镜像文件和BT种子,并且包含i686和x86_64的core库。
 
* 提供ISO镜像文件和BT种子,并且包含i686和x86_64的core库。
 
* 请阅读变更记录文件(Changelog)来确认对内存的需求。
 
* 请阅读变更记录文件(Changelog)来确认对内存的需求。
 
* 使用前请检查md5sum。
 
* 使用前请检查md5sum。
* [https://downloads.archlinux.de/iso/archboot/2012.01 下载 2012.01 „2k12-R1“] / [https://downloads.archlinux.de/iso/archboot/2012.01/boot 下载 /boot (PXE/Rescue 文件)] / [ftp://ftp.archlinux.org/iso/archboot/Changelog-2012.01-1.txt 变更文件] / [https://bbs.archlinux.org/viewtopic.php?id=134553 论坛]
+
* [https://downloads.archlinux.de/iso/archboot/2012.06 下载2012.06 „2k12-R3“] / [https://downloads.archlinux.de/iso/archboot/2012.06/boot 下载/boot (PXE/Rescue 文件)] / [ftp://ftp.archlinux.org/iso/archboot/Changelog-2012.06-1.txt 修改日志] / [https://bbs.archlinux.org/viewtopic.php?id=143541 论坛]
 
===News===
 
===News===
2012.01 „2k12-R1“
+
2012.06 „2k12-R3“
* pacman4 introduction, new LTS 3.0.x kernel and uefi shell
+
* 仅使用签名过的软件包,实验性的 systemd 支持
 
====General====
 
====General====
* kernel 3.2.1 / LTS kernel 3.0.17
+
* kernel 3.4.2 / LTS kernel 3.0.34
* pacman 4.0.1 usage
+
* pacman 4.0.3 usage
* RAM recommendations: 512 MB
+
* RAM recommendations: 768 MB
====Kernel 变更====
+
====Kernel changes====
* bump to latest 3.2.x series and bump lts to latest 3.0.x series
+
* bump to latest 3.4.x series and bump lts to latest 3.0.x series
====环境变更====
+
====Environment changes====
* 添加pacman4
+
* synced with latest mkinitcpio changes
* bumped lts kernel
+
* added systemd support, use init=/bin/systemd on boot command line to activate systemd installation mode
* added kmod insted of module-init-tools
+
====setup changes====
* 同步mkinitcpio变更
+
* added systemd support
* 增加 uefi shell
+
* generate enough entropy for pacman with haveged
====移除的特性====
+
* adopted pacman changes to use signed only packages
* 无
+
====快速安装修改====
====设置变更====
+
* added systemd support
* adopt pacman4 changes
+
* generate enough entropy for pacman with haveged
* adopt lts kernel changes
+
* adopted pacman changes to use signed only packages
* added btrfs compression option
+
====已知问题====
* allow btrfs on lts kernel
+
* systemd booting has a little bug: /var/run needs to be a symlink to /run
* added separate /usr detection
+
rm -r /var/run
* fixed manual mounting of install media
+
ln -s /run /var/run
* try to detect (using dmidecode) whether the UEFI boot has occured in a Mac
+
systemctl restart dbus.service systemd-logind.service
 
+
====hwdetect 变更====
+
* 添加 fsck hook
+
* 添加 shutdown hook
+
 
+
====quickinst 变更====
+
* 采纳 pacman4 变更
+
* 采纳 lts kernel 变更
+
  
 
===烧录发布===
 
===烧录发布===
Line 56: Line 47:
  
 
===PXE 启动 / 恢复系统===
 
===PXE 启动 / 恢复系统===
下载需要的PXE/rescue启动文件从/boot目录
+
/boot目录的PXE/rescue启动文件中下载需要的文件
* vmlinuz + initrd.img (i686)
+
Download the the needed files from the /boot directory PXE/rescue files.
* vm64 + initrd64.img (x86_64)
+
* vmlinuz_i686 + initramfs_i686.img (i686)
* vmlts + initrd.img (i686 LTS kernel)
+
* vmlinuz_x86_64 + initramfs_x86_64.img(x86_64)
* vm64lts + initrd64.img (x86_64 LTS kernel)
+
* vmlinuz_i686_lts + initramfs_i686.img (i686 LTS kernel)
* PXE 启动添加内核和初始化到你的tftp设置中并且运行的安装/恢复系统.
+
* vmlinuz_x86_64_lts + initramfs_x86_64.img (x86_64 LTS kernel)
 +
* For PXE booting add the kernel and initrd to your tftp setup and you will get a running installation/rescue system.
 
* For Rescue booting add a entry to your bootloader pointing to the kernel and initrd.
 
* For Rescue booting add a entry to your bootloader pointing to the kernel and initrd.
 +
 
===历史===
 
===历史===
 
发布历史可以从 [ftp://ftp.archlinux.org/iso/archboot/history 这里] 找到.
 
发布历史可以从 [ftp://ftp.archlinux.org/iso/archboot/history 这里] 找到.
===与正式发布的区别(历史版本)===
+
 
 +
===与正式发布的区别===
 
* It runs a modified Arch Linux system in initramfs.
 
* It runs a modified Arch Linux system in initramfs.
 
* It is restricted to RAM usage, everything which is not necessary like man pages etc. is not provided.
 
* It is restricted to RAM usage, everything which is not necessary like man pages etc. is not provided.
* It supports (u)efi booting via grub2 1.99.
+
* It supports (u)efi booting via grub-efi-x86_64.
* LTS kernel boot images are provided
+
* LTS kernel boot images are provided.
 +
* hwdetect script is used for preconfiguration
 +
* systemd is supported
 
* It does not mount anything during boot process.
 
* It does not mount anything during boot process.
* It uses a different setup script.
+
* It contains [core] repository on media.
 +
* It provides an ineteractive setup and quickinst script.
  
 
===设置特性(历史版本)===
 
===设置特性(历史版本)===
* CD/USB/OTHER FTP/HTTP 安装方式
+
* CD/USB/OTHER and FTP/HTTP installation mode
 
* Changing keymap and consolefont
 
* Changing keymap and consolefont
 
* Changing time and date
 
* Changing time and date
Line 88: Line 85:
 
* Configuration of basic system files
 
* Configuration of basic system files
 
* Setting root password
 
* Setting root password
* grub, grub2, lilo, extlinux/syslinux and grub2-uefi bootloader support
+
* grub2, lilo, extlinux/syslinux, grub2-uefi, rEFInd bootloader support
  
 
===启动参数===
 
===启动参数===
Line 149: Line 146:
 
* dmraid might be broken on some boards, support is not perfect here.  
 
* dmraid might be broken on some boards, support is not perfect here.  
 
:: The reason is there are so many different hardware components out there. At the moment 1.0.0rc16 is included, with latest fedora patchset.
 
:: The reason is there are so many different hardware components out there. At the moment 1.0.0rc16 is included, with latest fedora patchset.
* grub/grub2 cannot detect correct bios boot order:
+
* grub2 cannot detect correct bios boot order:
 
:: It may happen that hd(x,x) entries are not correct, thus first reboot may not work.  
 
:: It may happen that hd(x,x) entries are not correct, thus first reboot may not work.  
 
:: Reason: grub cannot detect bios boot order.  
 
:: Reason: grub cannot detect bios boot order.  
Line 158: Line 155:
 
:: cfdisk is a nice tool but is too limited to be the standard partitioner anymore.
 
:: cfdisk is a nice tool but is too limited to be the standard partitioner anymore.
 
:: cfdisk is still included but has to be run in an other terminal.
 
:: cfdisk is still included but has to be run in an other terminal.
 +
 +
===UEFI 参考===
 +
* [https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#Archboot Create UEFI bootable USB from ISO]
 +
* [https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#Archboot_2 Remove UEFI boot support from ISO]
  
 
===Bugs===
 
===Bugs===

Revision as of 03:56, 25 August 2012

Archboot是什么?

  • Archboot是一组启动CD/USB/PXE等启动介质的脚本。
  • 它用来安装或者恢复系统。
  • 它不依赖于任何文件系统,只能运行在内存中,因此需要你有足够的内存。
pacman -S archboot
Translation Status: This article is a localized version of Archboot. Last translation date: 2012-08-25. You can help to synchronize translation, if there were changes in English version.

Archboot的发布

News

2012.06 „2k12-R3“

  • 仅使用签名过的软件包,实验性的 systemd 支持

General

  • kernel 3.4.2 / LTS kernel 3.0.34
  • pacman 4.0.3 usage
  • RAM recommendations: 768 MB

Kernel changes

  • bump to latest 3.4.x series and bump lts to latest 3.0.x series

Environment changes

  • synced with latest mkinitcpio changes
  • added systemd support, use init=/bin/systemd on boot command line to activate systemd installation mode

setup changes

  • added systemd support
  • generate enough entropy for pacman with haveged
  • adopted pacman changes to use signed only packages

快速安装修改

  • added systemd support
  • generate enough entropy for pacman with haveged
  • adopted pacman changes to use signed only packages

已知问题

  • systemd booting has a little bug: /var/run needs to be a symlink to /run
rm -r /var/run 
ln -s /run /var/run
systemctl restart dbus.service systemd-logind.service

烧录发布

Hybrid镜像是一个CD和硬盘镜像。

  • 可以用来刻录CD(RW)光盘.
  • 可以使用'dd' 或者 similar 工具写入磁盘介质. 这种方法也可用用来制作USB盘。
'dd if=<imagefile> of=/dev/<yourdevice> bs=1M'

PXE 启动 / 恢复系统

从/boot目录的PXE/rescue启动文件中下载需要的文件 Download the the needed files from the /boot directory PXE/rescue files.

  • vmlinuz_i686 + initramfs_i686.img (i686)
  • vmlinuz_x86_64 + initramfs_x86_64.img(x86_64)
  • vmlinuz_i686_lts + initramfs_i686.img (i686 LTS kernel)
  • vmlinuz_x86_64_lts + initramfs_x86_64.img (x86_64 LTS kernel)
  • For PXE booting add the kernel and initrd to your tftp setup and you will get a running installation/rescue system.
  • For Rescue booting add a entry to your bootloader pointing to the kernel and initrd.

历史

发布历史可以从 这里 找到.

与正式发布的区别

  • It runs a modified Arch Linux system in initramfs.
  • It is restricted to RAM usage, everything which is not necessary like man pages etc. is not provided.
  • It supports (u)efi booting via grub-efi-x86_64.
  • LTS kernel boot images are provided.
  • hwdetect script is used for preconfiguration
  • systemd is supported
  • It does not mount anything during boot process.
  • It contains [core] repository on media.
  • It provides an ineteractive setup and quickinst script.

设置特性(历史版本)

  • CD/USB/OTHER and FTP/HTTP installation mode
  • Changing keymap and consolefont
  • Changing time and date
  • Preparing harddisk, like auto-prepare, partitioning, GUID (gpt) support, 4k sector drive support etc.
  • Creation of software raid/raid partitions, lvm2 devices and luks encrypted devices
  • Supports standard linux,raid/raid_partitions,dmraid,lvm2 and encrypted devices
  • Filesystem support: ext2/3/4, btrfs, nilfs2, reiserfs,xfs,jfs,ntfs-3g,vfat
  • Package selection support
  • Autoaddition of usefull packages, like ntfs-3g, dhclient etc.
  • LTS kernel support
  • Auto/Preconfiguration of fstab, mkinitcpio.conf, rc.conf, crypttab and mdadm.conf
  • Auto/Preconfiguration of KMS/framebuffers
  • Configuration of basic system files
  • Setting root password
  • grub2, lilo, extlinux/syslinux, grub2-uefi, rEFInd bootloader support

启动参数

建立启动参数

  • earlymodules
load modules before hooks are executed
Usage:
earlymodules=<comma-separated-array>
earlymodules=ahci,ehci-hcd
  • disablehooks
disable a hook which is run during bootup
Usage:
disablehooks=<comma-separated-array>
disablehooks=arch_floppy,arch_cdrom
  • root
Using this option will boot you into your specified existing system.
Usage:
root=/dev/<your-root-of-installed-system>
root=/dev/sda3
  • rootflags
Using this option will pass special mount options for your root device
Usage:
rootflags=<comma-separated-array>
rootflags=subvol=root,compress,ssd
  • lvmwait=
Using parameter followed by a comma-separated list of device names can be given on the command line.
It will cause the hook to wait until all given devices exist before trying to scan and activate any volume groups.
Usage:
lvmwait=/dev/mapper/device1,/dev/mapper/device2
  • advanced
This will override advanced hooks running order for your system.
Default order is arch_mdadm,arch_lvm2,arch_encrypt
Advanced hooks are: arch_mdadm,arch_lvm2,arch_encrypt
Usage:
advanced=hook1,hook2,hook3
advanced=arch_encrypt,arch_mdadm
  • ide-legacy
This will turn on the old IDE subsystem. This is only needed, if your system does not support the new PATA subsystem.
only valid parameter on LTS kernel images
  • arch-addons
You want to load external addon packages or configs into the install environment.
Place external addon packages in /packages directory of your external device.
Place external configs in /config directory of your external device.

视频和framebuffer 选项

  • uvesafb
enables uvesafb mode during boot and activates setup routine to use it later on installed system.
you need to specify your supported resolution eg.:
uvesafb=<resolution>-<depth>
uvesafb=1024x768-16
  • fbmodule
Loads the fb module you specify durin boot process and activates setup routine to use it later on installed system.
Use it like this fbmodule=<yourmodule>, e.g. fbmodule=cirrusfb

问题, Known Issues and limitations

  • Release specific known issues and workarounds are posted in changelog files.
  • Check also the forum threads for posted fixes and workarounds.
  • Why are /etc/modprobe.d/sound_persistent.conf and /etc/udev/rules.d/network_persistent.rules created?
These 2 files ensure persistent ordering of network and soundcards, else it might happen that the order changes during every boot.
  • dmraid might be broken on some boards, support is not perfect here.
The reason is there are so many different hardware components out there. At the moment 1.0.0rc16 is included, with latest fedora patchset.
  • grub2 cannot detect correct bios boot order:
It may happen that hd(x,x) entries are not correct, thus first reboot may not work.
Reason: grub cannot detect bios boot order.
Fix: Either change bios boot order or change menu.lst to correct entries after successful boot. This cannot be fixed it is a restriction in grub/grub2!
  • Why is parted used in setup routine, instead of cfdisk in msdos partitiontable mode?
parted is the only linux partition program that can handle all type of things the setup routine offers.
cfdisk cannot handle GPT/GUID nor it can allign partitions correct with 1MB spaces for 4k sector disks.
cfdisk is a nice tool but is too limited to be the standard partitioner anymore.
cfdisk is still included but has to be run in an other terminal.

UEFI 参考

Bugs

Arch Linux Bugtracker

链接

Usbstick 恢复

Take care about which device actually is your USB stick. The next command will render all data on /dev/sdX inaccessible.

  • First, wipe the bootsector of the USB stick:
dd if=/dev/zero of=/dev/sdX bs=512 count=1
  • Then, create a new FAT32 partition on the stick and write a FAT32 filesystem on it (vfat or type b in fdisk terminology):
fdisk /dev/sdX <<EOF
n
p
1

t
b
w
EOF

mkdosfs -F32 /dev/sdX1

建立镜像文件

如何建立Archboot Allinone ISO

(Quick regeneration of installation media with latest available core packages)

前提条件

  • x86_64环境
  • archboot的iso
  • 3G以上的硬盘空间

建立archboot chroots

# 安装 archboot
pacman -S archboot
# 以loop设备挂载archboot镜像文件
mount -o loop <imagefile> <imagepath>
# 建立 x86_64 chroot
mkdir <x86_64_chroot>
/usr/share/archboot/installer/quickinst media <x86_64_chroot> <imagepath>/core-x86_64/pkg
# 建立 i686 chroot
mkdir <i686_chroot>
linux32 /usr/share/archboot/installer/quickinst media <i686_chroot> <imagepath>/core-i686/pkg
# 卸载光盘镜像文件
umount <imagepath>
  • 挂载并复制文件到chroot目录下:
mount -o bind /dev <chrootpath>/dev
mount -o bind /tmp <chrootpath>/tmp
mount -o bind /sys <chrootpath>/sys
mount -o bind /proc <chrootpath>/proc
cp -a /etc/mtab <chrootpath>/etc/mtab
cp /etc/resolv.conf  <chrootpath>/etc/resolv.conf
  • 进入 archboot x86_64 chroot:
chroot <chrootpath>
  • 进入 archboot i686 chroot:
linux32 chroot <chrootpath>

安装和更新archboo

# 安装 in both chroots archboot:
pacman -S archboot
# 更新 in both chroots to latest available packages
pacman -Syu

生成镜像

# 运行 in both chroots (needs quite some time ...)
archboot-allinone.sh -t
# put the generated tarballs in one directory and run (needs quite some time ...)
archboot-allinone.sh -g
  • Finished you get a burnable iso image, a rawwrite usb image and a hybrid image which is both in one.
  • 在离开chroot时记得卸载它们:
umount <chrootpath>/dev
umount <chrootpath>/tmp
umount <chrootpath>/sys
umount <chrootpath>/proc

Have fun! tpowa (Archboot Developer)