Eric H. Johnson on 9 Jan 2013 14:15:51 -0800 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
[PLUG] Partitioning an SD Card |
Hi all, I have just started playing with a device similar to a Raspberry Pi or Beaglebone called an Olinuxino. More information can be found here: https://www.olimex.com/Products/OLinuXino/A13/ While waiting for my hardware to arrive I decided to take a shot at rolling my own kernel since I will need to modify it shortly to add real-time support (xenomai). I was able to successfully make uboot and the kernel and am now ready to write it to an SD card, which is where I am encountering a problem. The complete instructions are here: https://www.olimex.com/wiki/Build_Bootable_SD_Card_with_Debian These instructions are for Ubuntu, although no version is specified. I am running Ubuntu 12.04. I am at the section "Format and Setup the SD card": https://www.olimex.com/wiki/Build_Bootable_SD_Card_with_Debian#Format_and_se tup_the_SD-card The abbreviated commands are: # ls /dev/sd # fdisk -u=sectors /dev/sdb1 Within fdisk: 1. p <list partitions> 2. d 1 <if any partitions exist> 3. n p 1 <create first partition as primary, ordinal 1, sectors 2048-34815> 5. n p 2 <Create second partition primary, ordinal 2, sectors 34916 to all remaining> 6. p 7. w Exit fdisk # mkfs.vfat /dev/sdb1 # mkfs.ext3 /dev/sdb2 The first problem was with the command ls/dev/sd, I assume it should be ls /dev/sd*. Suffice it to say, when I insert the SD card, sdb and sdb1 appear. My machine also automatically mounts the SD card, so I unmounted it to run fdisk. FDisk runs fine up to the write, where I get "Re-reading the partition table failed with error 22: invalid argument. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8). I run partprobe which just drops back to the command prompt with no errors. If I go back into fdisk, my partitions are still there. Note, they are names sdb1p1 and sdb1p2. Running mkfs.vfat /dev/sdb1 appears to run successfully. Running mkfs.ext3 /dev/sdb2 gives and error "No such file or directory". This agrees with an ls of /dev, only sdb1 is listed. I also tried sdb1p1 and sdb1p2, but get the same no such file error. Also, after doing this if I go back into fdisk and list the partitions, no partitions are listed any more. Any idea what I am doing wrong? BTW, for anyone interested, I have just stared a blog to document my progress on this here: http://lcncolinuxino.blogspot.com/ Thanks, Eric ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug