Changes

Jump to navigation Jump to search
no edit summary
Line 34: Line 34:  
=== Determine the Device Name ===
 
=== Determine the Device Name ===
 
# Remove all USB flash drives, USB hard drives, and other removable disks attached to the system. Invoke a terminal window if running under X-windows.
 
# Remove all USB flash drives, USB hard drives, and other removable disks attached to the system. Invoke a terminal window if running under X-windows.
# Run <code>sudo fdisk -lu</code>. The output should look similar to this:  Disk /dev/sdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0xb51ef163    Device Boot      Start        End      Blocks  Id  System /dev/sdb1              63    23085404    11542671  83  Linux /dev/sdb2        23085405    33591914    5253255  83  Linux /dev/sdb3  *    33591915  138464234    52436160  83  Linux /dev/sdb4      138464235  243336554    52436160  83  Linux  
+
# Run <code>sudo fdisk -lu</code>.   The output should look similar to this:  
 +
  Disk /dev/sdb: 160.0 GB, 160041885696 bytes
 +
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Disk identifier: 0xb51ef163
 +
 +
     Device Boot      Start        End      Blocks  Id  System
 +
/dev/sdb1              63    23085404    11542671  83  Linux
 +
/dev/sdb2        23085405    33591914    5253255  83  Linux
 +
/dev/sdb3  *    33591915  138464234    52436160  83  Linux
 +
/dev/sdb4      138464235  243336554    52436160  83  Linux
 
# Insert the compact flash disk into the compact flash writer
 
# Insert the compact flash disk into the compact flash writer
# Run <code>sudo fdisk -lu</code>. The output should look similar to this:    Device Boot      Start        End      Blocks  Id  System /dev/sdb1              63    23085404    11542671  83  Linux /dev/sdb2        23085405    33591914    5253255  83  Linux /dev/sdb3  *    33591915  138464234    52436160  83  Linux /dev/sdb4      138464235  243336554    52436160  83  Linux  Disk /dev/sdc: 1024 MB, 1024966656 bytes 32 heads, 62 sectors/track, 1009 cylinders, total 2001888 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x00000000   Disk /dev/sdc doesn't contain a valid partition table Or This:     Device Boot      Start        End      Blocks  Id  System /dev/sdb1              63    23085404    11542671  83  Linux /dev/sdb2        23085405    33591914    5253255  83  Linux /dev/sdb3  *    33591915  138464234    52436160  83  Linux /dev/sdb4      138464235  243336554    52436160  83  Linux  Disk /dev/sdc: 2042 MB, 2042191872 bytes 5 heads, 50 sectors/track, 15954 cylinders, total 3988656 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x97880540    Device Boot      Start        End      Blocks  Id  System /dev/sdc1  *          50      254749      127350    6  FAT16 We are looking for any partition which is not an internal hard drive. Comparing the output in step 2, we see that /dev/sdc is a new device which was displayed in step 4 but not in step 2. In this particular case, /dev/sdc is the device name we are interested in as the size matches the size of the compact flash device we inserted into the writer. Make a note of your device name as it will be required to write the disk image to the compact flash in the next section. We will refer to the noted device as /dev/devicenamenoted throughout the rest of this article.
+
# Run <code>sudo fdisk -lu</code>. The output should look similar to this:    
# If you see a valid partition on the compact flash device (Step 4 example output 2) you will need unmount the partition. To unmount the partition, type <code>sudo umount /dev/devicenamenoted</code>
+
     Device Boot      Start        End      Blocks  Id  System
 +
/dev/sdb1              63    23085404    11542671  83  Linux
 +
/dev/sdb2        23085405    33591914    5253255  83  Linux
 +
/dev/sdb3  *    33591915  138464234    52436160  83  Linux
 +
/dev/sdb4      138464235  243336554    52436160  83  Linux
 +
 +
  Disk /dev/sdc: 1024 MB, 1024966656 bytes
 +
32 heads, 62 sectors/track, 1009 cylinders, total 2001888 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Disk identifier: 0x00000000
 +
 +
 +
Disk /dev/sdc doesn't contain a valid partition table
 +
Or this:
 +
  Device Boot      Start        End      Blocks  Id  System
 +
/dev/sdb1              63    23085404    11542671  83  Linux
 +
/dev/sdb2        23085405    33591914    5253255  83  Linux
 +
/dev/sdb3  *    33591915  138464234    52436160  83  Linux
 +
/dev/sdb4      138464235  243336554    52436160  83  Linux
 +
 +
  Disk /dev/sdc: 2042 MB, 2042191872 bytes
 +
5 heads, 50 sectors/track, 15954 cylinders, total 3988656 sectors
 +
Units = sectors of 1 * 512 = 512 bytes
 +
Disk identifier: 0x97880540
 +
 +
     Device Boot      Start        End      Blocks  Id  System
 +
/dev/sdc1  *          50      254749      127350    6  FAT16
 +
# We are looking for any partition which is not an internal hard drive. Comparing the output in step 2, we see that /dev/sdc is a new device which was displayed in step 4 but not in step 2. In this particular case, /dev/sdc is the device name we are interested in as the size matches the size of the compact flash device we inserted into the writer. Make a note of your device name as it will be required to write the disk image to the compact flash in the next section. We will refer to the noted device as /dev/devicenamenoted throughout the rest of this article.
 +
# If you see a valid partition on the compact flash device (Step 4 example output 2) you will need unmount the partition. To unmount the partition, type<code>sudo umount /dev/devicenamenoted</code>
    
= Limey Linux Instllation on a Large Compact Flash Card =
 
= Limey Linux Instllation on a Large Compact Flash Card =
   −
=== Written by Randy Hammock - KC6HUR ===
+
=== This section was Written by Randy Hammock - KC6HUR ===
 +
 
 
The following is the procedure I use to load Limey Linux onto a CF card. Since the CF card I was configuring in this example is significantly larger than Limey boot image, I also configured the remaining space on the CF card to be a Linux partition that can be used for additional storage (can you say audio files?). This procedure has been used to configure CF cards up to 4GB without any problems.
 
The following is the procedure I use to load Limey Linux onto a CF card. Since the CF card I was configuring in this example is significantly larger than Limey boot image, I also configured the remaining space on the CF card to be a Linux partition that can be used for additional storage (can you say audio files?). This procedure has been used to configure CF cards up to 4GB without any problems.
   Line 50: Line 89:  
Once you have down loaded the image from the Limey Linux web site and  un-tarred it, you need to copy the image to the CF card using the Linux '''dd''' command. '''Note: You must be root or use the sudo command for the following procedures to work:'''
 
Once you have down loaded the image from the Limey Linux web site and  un-tarred it, you need to copy the image to the CF card using the Linux '''dd''' command. '''Note: You must be root or use the sudo command for the following procedures to work:'''
   −
<code>root@sierra:/home/rhammock# dd if=cfimg-d201gly2-1.0.6 of=/dev/sdc</code>
+
    root@sierra:/home/rhammock# dd if=cfimg-d201gly2-1.0.6 of=/dev/sdc
 
+
    250880+0 records in
<code>250880+0 records in</code>
+
    250880+0 records out
 
+
    128450560 bytes (128 MB) copied, 233.421 s, 550 kB/s
<code>250880+0 records out</code>
  −
 
  −
<code>128450560 bytes (128 MB) copied, 233.421 s, 550 kB/s</code>
      
The Limey Linux image has now been copied onto the CF card. We will now create a Linux partition so that remainder of the card can be used for additional storage.
 
The Limey Linux image has now been copied onto the CF card. We will now create a Linux partition so that remainder of the card can be used for additional storage.
   −
<code>root@sierra:/home/rhammock# fdisk /dev/sdc</code>
+
    root@sierra:/home/rhammock# fdisk /dev/sdc
 
  −
<code>The number of cylinders for this disk is set to 4036.</code>
  −
 
  −
<code>There is nothing wrong with that, but this is larger than 1024,</code>
  −
 
  −
<code>and could in certain setups cause problems with:</code>
     −
<code>1) software that runs at boot time (e.g., old versions of LILO)</code>
+
The number of cylinders for this disk is set to 4036.
 
+
There is nothing wrong with that, but this is larger than 1024,
<code>2) booting and partitioning software from other OSs</code>
+
and could in certain setups cause problems with:
 
+
1) software that runs at boot time (e.g., old versions of LILO)
<code>(e.g., DOS FDISK, OS/2 FDISK)</code>
+
2) booting and partitioning software from other OSs
 +
(e.g., DOS FDISK, OS/2 FDISK)
    
Using the '''p''' command we can see that about 25% of the CF card is being used by the Limey Linux boot partition:
 
Using the '''p''' command we can see that about 25% of the CF card is being used by the Limey Linux boot partition:
 
+
Command (m for help): p
<code>Command (m for help): p</code>
+
 
+
Disk /dev/sdc: 512 MB, 512483328 bytes
<code>Disk /dev/sdc: 512 MB, 512483328 bytes</code>
+
4 heads, 62 sectors/track, 4036 cylinders
 
+
Units = cylinders of 248 * 512 = 126976 bytes
<code>4 heads, 62 sectors/track, 4036 cylinders</code>
+
Disk identifier: 0x00000000
 
+
<code>Units = cylinders of 248 * 512 = 126976 bytes</code>
+
Device Boot Start End Blocks Id System
 
+
/dev/sdc1 * 1 1011 125333 6 FAT16
<code>Disk identifier: 0x00000000</code>
  −
 
  −
<code>Device Boot     Start         End     Blocks   Id System</code>
  −
 
  −
<code>/dev/sdc1   *           1       1011     125333   6 FAT16</code>
  −
 
   
The '''n''' command is used to create a new partition. This will be a primary partition and use number 2 since 1 is the boot partition. Just press Enter for the First cylinder and Last cylinder questions to accept the default conditions which be to use the remainder of the CF card.
 
The '''n''' command is used to create a new partition. This will be a primary partition and use number 2 since 1 is the boot partition. Just press Enter for the First cylinder and Last cylinder questions to accept the default conditions which be to use the remainder of the CF card.
   −
<code>Command (m for help): n</code>
+
Command (m for help): n
 
+
Command action
<code>Command action</code>
+
e extended
 
+
p primary partition (1-4)
<code>e   extended</code>
+
p
 
+
Partition number (1-4): 2
<code>p   primary partition (1-4)</code>
+
First cylinder (1012-4036, default 1012):
 
+
Using default value 1012
<code>p</code>
+
Last cylinder or +size or +sizeM or +sizeK (1012-4036, default 4036):
 
+
Using default value 4036  
<code>Partition number (1-4): 2</code>
+
 
  −
<code>First cylinder (1012-4036, default 1012):</code>
  −
 
  −
<code>Using default value 1012</code>
  −
 
  −
<code>Last cylinder or +size or +sizeM or +sizeK (1012-4036, default 4036):</code>
  −
 
  −
<code>Using default value 4036</code>
  −
 
   
Use the '''p''' command to examine our current configuration.
 
Use the '''p''' command to examine our current configuration.
 
+
<code>Command (m for help): p</code>
+
Command (m for help): p
 
+
<code>Disk /dev/sdc: 512 MB, 512483328 bytes</code>
+
Disk /dev/sdc: 512 MB, 512483328 bytes
 
+
4 heads, 62 sectors/track, 4036 cylinders
<code>4 heads, 62 sectors/track, 4036 cylinders</code>
+
Units = cylinders of 248 * 512 = 126976 bytes
 
+
Disk identifier: 0x00000000
<code>Units = cylinders of 248 * 512 = 126976 bytes</code>
+
 
+
Device Boot Start End Blocks Id System
<code>Disk identifier: 0x00000000</code>
+
/dev/sdc1 * 1 1011 125333 6 FAT16
 
+
/dev/sdc2 1012 4036 375100 83 Linux
<code>Device     Boot     Start       End       Blocks   Id System</code>
+
 
  −
<code>/dev/sdc1   *           1       1011     125333   6 FAT16</code>
  −
 
  −
<code>/dev/sdc2           1012       4036     375100   83 Linux</code>
  −
 
   
We must now write this configuration out to the CF card using the '''w''' command.
 
We must now write this configuration out to the CF card using the '''w''' command.
 
+
<code>Command (m for help): w</code>
+
Command (m for help): w
 
+
The partition table has been altered!
<code>The partition table has been altered!</code>
+
 
+
Calling ioctl() to re-read partition table.
<code>Calling ioctl() to re-read partition table.</code>
+
 
+
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
<code>WARNING: Re-reading the partition table failed with error 16: Device or resource busy.</code>
+
The kernel still uses the old table.
 
+
The new table will be used at the next reboot.
<code>The kernel still uses the old table.</code>
+
Syncing disks.
 
+
<code>The new table will be used at the next reboot.</code>
  −
 
  −
<code>Syncing disks.</code>
      
We must now format the newly created partition. To do this we will use the '''mkfs''' (Make Filesystem) command. From above, we see that the Linux partition is located on /dev/sdc2 (the second partition on /dev/sdc). Remember, your system might have the CF card configured as a different device.
 
We must now format the newly created partition. To do this we will use the '''mkfs''' (Make Filesystem) command. From above, we see that the Linux partition is located on /dev/sdc2 (the second partition on /dev/sdc). Remember, your system might have the CF card configured as a different device.
   −
<code>root@sierra:/home/rhammock# mkfs -t ext2 /dev/sdc2</code>
+
root@sierra:/home/rhammock# mkfs -t ext2 /dev/sdc2
 
+
mke2fs 1.40.8 (13-Mar-2008)
<code>mke2fs 1.40.8 (13-Mar-2008)</code>
+
Filesystem label=
 
+
OS type: Linux
<code>Filesystem label=</code>
+
Block size=1024 (log=0)
 
+
Fragment size=1024 (log=0)
<code>OS type: Linux</code>
+
93840 inodes, 375100 blocks
 
+
18755 blocks (5.00%) reserved for the super user
<code>Block size=1024 (log=0)</code>
+
First data block=1
 
+
Maximum filesystem blocks=67633152
<code>Fragment size=1024 (log=0)</code>
+
46 block groups
 
+
8192 blocks per group, 8192 fragments per group
<code>93840 inodes, 375100 blocks</code>
+
2040 inodes per group
 
+
Superblock backups stored on blocks:
<code>18755 blocks (5.00%) reserved for the super user</code>
+
8193, 24577, 40961, 57345, 73729, 204801, 221185  
 
+
<code>First data block=1</code>
+
Writing inode tables: done
 
+
Writing superblocks and filesystem accounting information: done
<code>Maximum filesystem blocks=67633152</code>
+
 
+
This filesystem will be automatically checked every 31 mounts or
<code>46 block groups</code>
+
180 days, whichever comes first. Use tune2fs -c or -i to override.
 
  −
<code>8192 blocks per group, 8192 fragments per group</code>
  −
 
  −
<code>2040 inodes per group</code>
  −
 
  −
<code>Superblock backups stored on blocks:</code>
  −
 
  −
<code>8193, 24577, 40961, 57345, 73729, 204801, 221185</code>
  −
 
  −
<code>Writing inode tables: done</code>
  −
 
  −
<code>Writing superblocks and filesystem accounting information: done</code>
     −
<code>This filesystem will be automatically checked every 31 mounts or</code>
     −
<code>180 days, whichever comes first.  Use tune2fs -c or -i to override.</code>
      
Because Ubuntu remounted the boot partition and opened a File Browser window for that partition when we finished creating the Linux partition, close the File Browser window then unmount the device as was done before.
 
Because Ubuntu remounted the boot partition and opened a File Browser window for that partition when we finished creating the Linux partition, close the File Browser window then unmount the device as was done before.

Navigation menu