erland wrote: 
> I'm just going to ask here in case someone has a good idea.
> 
> The only computers I have with SD card readers are based on OSX and OSX
> can't format/read ext4 as far as I know.
> 
> So is there a good way to install Arch or more specifically Squeeze on
> Arch on a SD card using an OSX setup ?
> 
Not sure if this helps anyone, but I thought I'd post it so I at least
have the instructions somewhere the next time I need to do this myself.
I successfully created a normal image file which can be written to a SD
card from Windows or OSX as follows:

1. Install VirtualBox on Windows/OSX and create a new virtual machine
which you install Ubuntu 14.04 in.

2. Follow the following to create an image file
This is for a Wandboard Dual, you need to use different distribution
tar.gz file and different u-boot imx file for other platforms.
It's probably possible to make a smaller image and then resize the
partition afterwards.


Code:
--------------------
    
  # The following instructions was taken from: 
https://wiki.archlinux.org/index.php/Creating_Arch_Linux_disk_image
  
  # Make sure we have at least 16GB free space in /media/somedir
  
  # Install kpartx
  sudo apt-get install kpartx
  
  # Create an empty image file (using 16 GB didn't work because my SD card was 
slightly smaller than 16GB)
  sudo fallocate -l 15G /media/somedir/archlinux.img
  
  # Create a partition in the image file and make it bootable
  sudo fdisk /media/somedir/archlinux.img
  1. o: Create an empty DOS partition table
  2. n, p, 1, 8192: Create a primary particion starting at block 8192
  3. a, 1: Make primary partition bootable
  4. w: Write table to disk
  
  # Mount image as /dev/loop0
  sudo losetup -f --show /media/somedir/archlinux.img
  sudo kpartx -a /dev/loop0
  
  # Format primary partition in the mounted image
  sudo mkfs.ext4 /dev/mapper/loop0p1
  
  # Mount first partition in /media/somedir/tmp
  sudo mkdir /media/somedir/tmp
  sudo mount /dev/mapper/loop0p1 /media/somedir/tmp
  
  # Retrieve and extract Arch distribution in the mounted directory
  wget http://archlinuxarm.org/os/ArchLinuxARM-wand-latest.tar.gz
  tar -xf ArchLinuxARM-wand-latest.tar.gz -C /media/somedir/tmp
  sudo sync
  sudo umount /media/somedir/tmp
  
  # Retrieve and write u-boot to the image
  wget http://archlinuxarm.org/os/imx6/boot/wandboard/u-boot-dual.imx
  sudo dd if=u-boot-dual.imx of=/dev/loop0 bs=512 seek=2
  sudo sync
  
  # Unmount image
  sudo kpartx -d /dev/loop0
  sudo losetup -d /dev/loop0
  
  # We now have a normal image file in /media/somedir/archlinux.img which we 
can copy to the OSX/Windows computer and write to a SD card in the normal way.
  
--------------------


3. Write archlinux.img to your SD card using your normal Windows/OSX
computer.

4. Insert SD card in Wandboard and let it boot and login via ssh with
root/root and run following receive updates to the U-Boot bootloader:
pacman -Sy uboot-wandboard-dual

5. Follow SqueezeOnArch installation instructions according to the
README.md file:
https://github.com/SqueezeOnArch/soa-aur/blob/master/README.md

The whole process would be a lot easier for Windows/OSX user if step 1
and 2 in the above instruction could be made once by someone and then
redistributed. However, I'm not sure if it was this kind of distribution
of complete images that brought the CommunitySqueeze project down, so I
don't want to do it myself until someone with deeper knowledge has
ensured me there isn't some kind of legal problem to distribute complete
images which I haven't realised yet.



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
(Developer of 'many plugins/applets (both free and commercial)'
(http://wiki.slimdevices.com/index.php/User:Erland). 
If you like to encourage future presence on this forum and/or third
party plugin/applet development, 'consider purchasing some plugins'
(http://license.isaksson.info))

*Interested in the future of music streaming ? 'ickStream -  A world of
music at your fingertips'
(http://forums.slimdevices.com/showthread.php?98467-Pre-Announcement-ickStream&p=743516)*.
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=101624

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to