OSDN Git Service

Merge branch 'dev' into dev-stable
[alterlinux/alterlinux.git] / docs / archiso / README.transfer
1 INDEX
2 -----
3
4 * Transfer ISO file to target medium (configs/releng)
5   * To -> CD / DVD / BD
6   * To -> USB-key / SD / HDD / SSD
7     * PC-BIOS (MBR)
8     * PC-BIOS (ISOHYBRID-MBR)
9     * PC-EFI (GPT) [x86_64 only]
10     * PC-EFI (ISOHYBRID-GPT) [x86_64 only]
11
12
13
14 *** Transfer ISO image to target medium (configs/releng)
15
16 ISO images names consist of: archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
17
18 Where:
19     <YYYY> Year
20     <MM> Month
21     <DD> Day
22
23
24 ** To -> CD / DVD / BD
25
26 Note: All ISO images are booteable on a PC-BIOS via "El Torito" in no-emulation mode,
27       All x86_64 ISO images are booteable on a PC-EFI via "El Torito" in no-emulation mode.
28
29 Nomeclature:
30     <B> scsibus number
31     <T> target number
32     <L> lun number
33     (Note: see cdrecord -scanbus, for these numbers)
34
35
36 1) Write it directly using your favorite recording program.
37 # cdrecord dev=<B>,<T>,<L> -dao archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
38
39
40 ** To -> USB Flash Drive (USB-key) / Memory card (SD) /
41          Hard-Disk Drive (HDD) / Solid-State Drive (SSD)
42
43 Note: These steps are the general workflow, you can skip some of them,
44       using another filesystem if your bootloader supports it,
45       installing to another directory than "arch/" or using more than
46       one partition. Just ensure that main boot params options
47       (archisolabel= and archisobasedir=) are set correctly according to your setup.
48
49 Nomeclature:
50 <DEV-TARGET>:   Device node of the drive where ISO contents should be copied
51                 (example: /dev/sdx)
52 <DEV-TARGET-N>: Device node of the partition on <DEV-TARGET>
53                 (example: /dev/sdx1)
54 <MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted
55                 (example: /mnt/sdx/1)
56 <ISO-SOURCE>:   Path to the ISO file archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
57                 (example: ~/archlinux-2017.03.01-x86_64.iso)
58 <FS-LABEL>:     Represents the filesystem label of the <ISO-SOURCE>
59                 (example: ARCH_201703)
60
61
62 * PC-BIOS (MBR):
63
64 Note: Using here a MBR partition mode as example, but GPT should also works
65       if machine firmware is not broken.
66       Just ensure that partition is set with attribute "2: legacy BIOS bootable"
67       and use gptmbr.bin instead of mbr.bin for syslinux.
68
69 1) Create one partition entry in MBR and mark it as "active" (booteable).
70 Note: Type "b" for FAT32, "83" for EXTFS or "7" for NTFS.
71 # fdisk <DEV-TARGET>
72
73 2) Create a FAT32, EXTFS or NTFS filesystem on such partition and setup a label.
74 Note: COW is not supported on NTFS.
75 # mkfs.fat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
76 # mkfs.ext4 -L <FS-LABEL> <DEV-TARGET-N>
77 # mkfs.ntfs -L <FS-LABEL> <DEV-TARGET-N>
78
79 3) Mount target filesystem.
80 # mount <DEV-TARGET-N> <MNT-TARGET-N>
81
82 4) Extract ISO image on target filesystem.
83 # bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
84
85 5) Install syslinux bootloader on target filesystem.
86 # extlinux -i <MNT-TARGET-N>/arch/boot/syslinux
87
88 6) Unmount target filesystem.
89 # umount <MNT-TARGET-N>
90
91 7) Install syslinux MBR boot code on target drive.
92 # dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=<DEV-TARGET>
93
94
95 * PC-BIOS (ISOHYBRID-MBR):
96
97 Note: This method is the most easily, quick and dirty, but is the most limited
98       if you want to use your target medium for other purposes.
99       If using this does not work, use PC-BIOS (MBR) method instead.
100
101 1) Dump ISO file to target medium.
102 # dd if=<ISO-SOURCE> of=<DEV-TARGET>
103
104
105 * PC-EFI (GPT) [x86_64 only]
106
107 Note: Using here a GPT partition mode as example, but MBR should also works
108       if machine firmware is not broken.
109
110 1) Create one partition entry in GPT (of type "ef00")
111 # gdisk <DEV-TARGET>
112
113 2) Create a FAT32 filesystem on such partition and setup a label.
114 # mkfs.fat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
115
116 3) Mount target filesystem.
117 # mount <DEV-TARGET-N> <MNT-TARGET-N>
118
119 4) Extract ISO image on target filesystem.
120 # bsdtar -x --exclude=isolinux/ --exclude=EFI/alteriso/ --exclude=arch/boot/syslinux/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
121
122 5) Unmount target filesystem.
123 # umount <MNT-TARGET-N>
124
125
126 * PC-EFI (ISOHYBRID-GPT) [x86_64 only]
127
128 Note: This method is the most easily, quick and dirty, but is the most limited
129       if you want to use your target medium for other purposes.
130       If using this does not work, use PC-EFI (GPT) method instead.
131
132 1) Dump ISO file to target medium.
133 # dd if=<ISO-SOURCE> of=<DEV-TARGET>