<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yoshi314</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yoshi314"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Yoshi314"/>
	<updated>2026-04-30T19:59:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Template:Copying_Alpine_to_Flash&amp;diff=4856</id>
		<title>Template:Copying Alpine to Flash</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Template:Copying_Alpine_to_Flash&amp;diff=4856"/>
		<updated>2011-01-19T15:56:18Z</updated>

		<summary type="html">&lt;p&gt;Yoshi314: added a few USB related tips.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Copy Alpine to a {{{1|Flash Medium}}} ==&lt;br /&gt;
&lt;br /&gt;
# Insert the removable {{{1|flash medium (CF or USB stick)}}} into the computer.&lt;br /&gt;
# Determine the name your computer uses for your {{{1|flash medium}}}. The following step is one way to do this.&lt;br /&gt;
#* After inserting the {{{1|flash medium}}}, run the command:&lt;br /&gt;
#* {{Cmd|dmesg}}&lt;br /&gt;
#* At the end of this command you should see the name of your {{{1|flash medium}}}, likely starting with &amp;quot;sd&amp;quot;. (For example: &amp;quot;sda&amp;quot;).&lt;br /&gt;
#* The remainder of this document will assume that your {{{1|flash medium}}} is called /dev/sda&lt;br /&gt;
&lt;br /&gt;
{{Warning|Be very careful about this. You do not want to mistakenly wipe your hard drive if it&#039;s on /dev/sda}}&lt;br /&gt;
&lt;br /&gt;
=== Format {{{1|Flash Medium}}} ===&lt;br /&gt;
{{Cmd|fdisk /dev/sda}}&lt;br /&gt;
* &#039;&#039;&#039;p&#039;&#039;&#039; Print list of partitions&lt;br /&gt;
* &#039;&#039;&#039;d&#039;&#039;&#039; Delete all partitions (this may take a few steps)&lt;br /&gt;
* &#039;&#039;&#039;n&#039;&#039;&#039; Create a new partition&lt;br /&gt;
* &#039;&#039;&#039;p&#039;&#039;&#039; A primary partition&lt;br /&gt;
* &#039;&#039;&#039;1&#039;&#039;&#039; Partition number 1&lt;br /&gt;
** Use defaults for first and last cylinder (just press [Enter] twice).&lt;br /&gt;
* &#039;&#039;&#039;t&#039;&#039;&#039; Change partition type&lt;br /&gt;
* &#039;&#039;&#039;c&#039;&#039;&#039; Type: Win95 FAT32 (LBA)&lt;br /&gt;
* &#039;&#039;&#039;a&#039;&#039;&#039; Make the partition bootable (set boot flag)&lt;br /&gt;
* &#039;&#039;&#039;1&#039;&#039;&#039; Partition number 1&lt;br /&gt;
* &#039;&#039;&#039;w&#039;&#039;&#039; Write your changes to the device&lt;br /&gt;
&lt;br /&gt;
=== Install Syslinux ===&lt;br /&gt;
{{Note|If the following commands fail due to &#039;No such file or directory&#039;, you may have to remove and reinsert the CF card, or even reboot, to get /dev/sda1 to appear}}&lt;br /&gt;
# Install syslinux and dosfstools. If you have booted from an Alpine CD-ROM, use these commands:&lt;br /&gt;
#* {{Cmd|apk add syslinux dosfstools}}&lt;br /&gt;
#* {{Cmd|{{{|dd if=/usr/share/syslinux/mbr.bin of=/dev/sda}}}}}&lt;br /&gt;
# Format the {{{1|flash medium}}} with a VFAT filesystem:&lt;br /&gt;
#* {{Cmd|mkdosfs -F32 /dev/sda1}}&lt;br /&gt;
#* {{Cmd|syslinux /dev/sda1}}&lt;br /&gt;
#* {{Cmd|mkdir -p /media/sda1}}&lt;br /&gt;
#* {{Cmd|mount -t vfat /dev/sda1 /media/sda1}}&lt;br /&gt;
# Mount the Alpine Linux CD-ROM, and copy the files to the {{{1|flash medium}}}&lt;br /&gt;
#* {{Cmd|mount /media/cdrom}}&lt;br /&gt;
#* {{Cmd|cd /media/cdrom}}&lt;br /&gt;
#* {{Cmd|cp -a .alpine-release * /media/sda1/ }}&lt;br /&gt;
&lt;br /&gt;
=== Set up a Serial Console (Optional) ===&lt;br /&gt;
&lt;br /&gt;
You can now edit syslinux.cfg to add a serial console to the {{{1|flash medium}}}.&lt;br /&gt;
&lt;br /&gt;
# Open /media/sda1/syslinux.cfg for editing.&lt;br /&gt;
#* {{Cmd|vi /media/sda1/syslinux.cfg}}&lt;br /&gt;
# Add the line `serial 0 9600` to the top of the file&lt;br /&gt;
# Add the text ` console=tty1,38400 console=ttyS0,9600` to the end of the &amp;quot;append&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
The result should look like this:&lt;br /&gt;
 serial 0 9600&lt;br /&gt;
 timeout 20&lt;br /&gt;
 prompt 1&lt;br /&gt;
 default grsec&lt;br /&gt;
 label grsec&lt;br /&gt;
 	kernel /boot/grsec&lt;br /&gt;
 	append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage console=tty1,38400 console=ttyS0,9600&lt;br /&gt;
&lt;br /&gt;
Next, enable the serial console on ttyS0 by editing the inittab file:&lt;br /&gt;
# Open /media/sda1/etc/inittab for editing.&lt;br /&gt;
#* {{Cmd|vi /media/sda1/etc/inittab}}&lt;br /&gt;
# Find and uncomment the following line:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;#ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: So it looks like this:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
When your USB device is formatted to other filesystem than fat32, you might have to specify the necessary filesystem modules in boot parameters.&lt;br /&gt;
&lt;br /&gt;
To do so, mount the device, and alter the syslinux.cfg file line from &lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet&lt;br /&gt;
to&lt;br /&gt;
 append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet&lt;br /&gt;
&lt;br /&gt;
in case of using ext3 formatted partition. Similar procedure might apply to other filesystems (if they are supported by syslinux or other bootloader of your choice and alpine kernel).&lt;br /&gt;
&lt;br /&gt;
Also, specifying waitusb=X option might help with certain usb devices that take a bit longer to register. X stands for the amount of seconds kernel will wait before looking for the installation media.&lt;/div&gt;</summary>
		<author><name>Yoshi314</name></author>
	</entry>
</feed>