Template:Copying Alpine to Flash: Difference between revisions

From Alpine Linux
mNo edit summary
Line 3: Line 3:
# Insert the removable {{{1|flash medium (CF or USB stick)}}} into the computer.
# Insert the removable {{{1|flash medium (CF or USB stick)}}} into the computer.
# Determine the name your computer uses for your {{{1|flash medium}}}. The following step is one way to do this.
# Determine the name your computer uses for your {{{1|flash medium}}}. The following step is one way to do this.
## After inserting the {{{1|flash medium}}}, run the command:
#* After inserting the {{{1|flash medium}}}, run the command:
{{Cmd|dmesg}}
#* {{Cmd|dmesg}}
## At the end of this command you should see the name of your {{{1|flash medium}}}, likely starting with "sd". (For example: "sda").
#* At the end of this command you should see the name of your {{{1|flash medium}}}, likely starting with "sd". (For example: "sda").
## The remainder of this document will assume that your {{{1|flash medium}}} is called /dev/sda
#* The remainder of this document will assume that your {{{1|flash medium}}} is called /dev/sda
# Format the {{{1|flash medium}}} with a VFAT filesystem:
# Format the {{{1|flash medium}}} with a VFAT filesystem:
{{Cmd|mkdosfs -F32 /dev/sda1
#* {{Cmd|mkdosfs -F32 /dev/sda1}}
syslinux /dev/sda1}}
#* {{Cmd|syslinux /dev/sda1}}
# Mount the Alpine Linux CD-ROM, and copy the files to the {{{1|flash medium}}}
# Mount the Alpine Linux CD-ROM, and copy the files to the {{{1|flash medium}}}
{{Cmd|mount /media/cdrom}}
#* {{Cmd|mount /media/cdrom}}
{{Cmd|cd /media/cdrom}}
#* {{Cmd|cd /media/cdrom}}
{{Cmd|cp -a .alpine-release * /media/sda1/ }}
#* {{Cmd|cp -a .alpine-release * /media/sda1/ }}
 
=== Set up a Serial Console (Optional) ===
 
You can now edit syslinux.cfg to add a serial console to the {{{1|flash medium}}}.
 
# Open /media/sda1/syslinux.cfg for editing.
#* {{Cmd|vi /media/sda1/syslinux.cfg}}
# Add the line `serial 0 9600` to the top of the file
# Add the text ` console=tty=38400 console=ttyS0,9600` to the end of the "append" line.
 
The result should look like this:
serial 0 9600
timeout 20
prompt 1
default grsec
label grsec
kernel /boot/grsec
append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage console=tty1,38400 console=ttyS0,9600

Revision as of 14:32, 9 October 2009

Copy Alpine to a Flash Medium

  1. Insert the removable flash medium (CF or USB stick) into the computer.
  2. Determine the name your computer uses for your flash medium. The following step is one way to do this.
    • After inserting the flash medium, run the command:
    • dmesg

    • At the end of this command you should see the name of your flash medium, likely starting with "sd". (For example: "sda").
    • The remainder of this document will assume that your flash medium is called /dev/sda
  3. Format the flash medium with a VFAT filesystem:
    • mkdosfs -F32 /dev/sda1

    • syslinux /dev/sda1

  4. Mount the Alpine Linux CD-ROM, and copy the files to the flash medium
    • mount /media/cdrom

    • cd /media/cdrom

    • cp -a .alpine-release * /media/sda1/

Set up a Serial Console (Optional)

You can now edit syslinux.cfg to add a serial console to the flash medium.

  1. Open /media/sda1/syslinux.cfg for editing.
    • vi /media/sda1/syslinux.cfg

  2. Add the line `serial 0 9600` to the top of the file
  3. Add the text ` console=tty=38400 console=ttyS0,9600` to the end of the "append" line.

The result should look like this:

serial 0 9600
timeout 20
prompt 1
default grsec
label grsec
	kernel /boot/grsec
	append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage console=tty1,38400 console=ttyS0,9600