Booting Acer Aspire One from SD Card

A while ago I got my hands on an Acer Aspire One. Once set up on the Windows side, I needed to get Linux running. This machine comes with a 160GB hard drive, but I don’t want to use it. I want Linux to run from an SD card inserted in the expansion card reader, without involving the internal hard drive at all.

With the SD card in the expansion bay, it is nearly completely encased in the computer so there’s very little risk of pieces breaking off. The same could not be said if I use a typical pen drive. The relatively large dongle with such a small computer would be ripe for being snapped off. But…how do I make this happen?

In addition to trying to get Linux installed on the SD card, in bootable form, a major hurdle that we must overcome is that the BIOS of the Aspire One cannot be configured to boot from the SD card. This is a definite drawback of the Acer compared to other manufacturers like HP and the eeePC.

Because the Aspire One does not allow booting directly from the SD card, I must install a boot loader on another device which can be booted from the BIOS. The boot loader must have the ability to access and finish the boot from the SD card. There is no CD drive on the netbook, so our options for booting are either the hard drive or a pen drive. I could install the boot loader on the internal hard drive. This would be the easy way proceed and it is how things are normally done, but I don’t want to modify the hard drive. For one thing, I don’t want my Linux install dependent on the Windows Disk. Also, I want to keep the Windows side relatively unchanged. So, the only option left is to build boot from a pen drive. In the end, I want to have a “key” to start Linux. Once it is up and running, I can remove the key and the computer will run happily along from the SD card. Of course, you always have to have the key with you to start the computer. This may not be ideal for everyone but it was the best solution for me.

The first step in the process is to choose which distribution I want to run on the laptop. I have always played with the Red Hat and Fedora side of things, but have been hearing really good things about Ubuntu. In particular eeebuntu ships with the common drivers for these netbooks. I was too tempted by not having to configure the wireless adapter that I abandoned all things Red Hat and gave it a try.

Let’s talk a little bit about our approach. It is outlined very well at http://www.osnews.com/story/20743/Eeebuntu_2_0_SD_Card_Installation_on_the_Aspire_One. In essence, A bootloader (GRUB) will be installed on the pen drive. This will be my boot device. GRUB will hold a ram image to start booting the kernel. This image will contain the necessary modules to read from my SD card. The ram drive will initialize the process of reading from the SD card and establish my root as being the SD card. Beyond the boot process, nothing will be needed from the pen drive.

What you need:
For this process, you will need a high speed Internet connection, a pen drive (at least 1GB), an SD card (at least 8 GB), a usb SDHC memory card reader, and the netbook.

GRUB vs. SysLinux
I’ve been playing with Linux for a little while (over 10 years) and never realized the difference between GRUB and Syslinux. Honestly, I’ve never had to play much with the boot process. Both these bootloaders can be used to start Linux on a machine. Syslinux is typically used with Knoppix and other LiveCD products, where GRUB is now the default bootloader for most installed Linux distributions. Why?

Big difference – Syslinux is for use with msdos file systems (FAT) and GRUB is designed for Linux partitions (typically ext2). This is huge! There are some things that we will do to boot from the SD card, specifically calling it out by its UUID which need to be done in GRUB. If you want GRUB on a disk, you better being using a Linux file system. Good to know!

Step 1 – Get a working Linux Install

You need to have some access to Linux on this system. It is a netbook, so there is no internal CD drive. That basically rules out a LiveCD. I would recommend making a bootable Live USB drive instead. Look here for detailed instructions. I recommend using either the image for ubuntu or eeebuntu to make your pen drive, as it will be easier to install eeebuntu later. I only provide this caution, these instructions provide for the installation using unetbootin, which uses Syslinux for its bootloader. In other words, you can’t install directly to the SD Card.

Step 2 – Install eeebuntu on the Memory Card

Insert your SDHC card through the USB memory card reader. (Note: Although the Aspire One can’t boot directly from the SD card in its internal reader, it can boot from it through a USB reader. When the SD card is inserted through the reader, it will appear to the computer as something very similar to a pen drive. This will prove very helpful to us.)

Once the card is inserted, you can boot the computer using your live pen drive. From the System menu, choose to install eeebuntu to the SD card. This is the same process used for installing a live distribution to any hard drive. Be careful to select the correct drive to install to. The SD card will start with “/dev/mmc***” This is not to be confused with your internal hard drive which will likely report as “/dev/sda.”

Step 3 – Determine the UUID of the memory card

Each install of Linux keeps a unique ID for devices that it sees. These are called the UUID. You can view what UUID has been assigned to each device on your machine by doing a:

#ls -l /dev/disks/by-uuid

Once eeebuntu is installed on the SD card, you must boot from the SD card and see what UUID eeebuntu has assigned to your disk. To do this, boot from the SD card (still in the USB reader). Then, open a terminal and type the command above.

You should see the UUID of your memory card next to the /dev/mmc*** drive. Write this down and keep it in a good place. You can also get the uuid from the /boot/grub/menu.lst file once you have booted from the SD card.

Step 4 – Modify the initramfs to include the modules for reading the SD card

Do the following (either as root or using sudo)

#cd /etc/initramfs-tools
#nano modules

Add these modules to the bottom of the modules file

mmc_core
mmc_block
sdhci
sdhci-pci

Update the initramfs on the SD card

#update-initramfs -u

At this point, the SD card should have an initial ram image that contains the necessary modules to read from the SD card. This is fine, but you can’t read from the SD card to get those modules until the SD card can be read. It’s like the old Windows error that I would get “Can’t load CD Rom Driver…please insert disk labeled Windows 95 CD Rom to install the driver.”
Step 5 – Install GRUB on a pen-drive (Make your “key”)

Prepare the pen drive that you are going to use for the key by doing the following

  1. Partition the drive as a Linux drive using fdisk (ext2)
  2. Mark the partition as bootable
  3. Write the partition table
  4. Unmount the drive
  5. Make the file system using # mke2fs -v /dev/sdc1 (substitute in the appropriate device)
  6. Mount the new drive
  7. Change directory to the new drive

Next run the following command to actually install Grub

#grub-install --o-floppy --root-directory=./dev/<device.

Copy the initramfs from the SD card into the new pen-drive key

#cp /boot/initrd.img.xxx.xxx <new drive>/boot/initrd.img.xxx.xxx

Copy vmlinuz and initram to the boot directory on the pen drive

Copy the menu.lst from the /boot/grub directory onto the new pen drive.

Finally modify the menu.lst (using nano or the editor of your choice). In my case, the first menu option is

title    Ubuntu 8.10, kernel 2.6.27-8-333pc-SDHC
kernel   /boot/vmlinux-2.6.27-8-eeepc root=UUID-27114f3d-9c0a-454b-9272-30184cdc610a ro quiet splash clocksource=hpet
initrd   /boot/initrd.img-2.6.27-8-eeepc
quiet

Note that the kernel uses the root as the SD card. This is because we want the root directory, and all Linux files to come from the SD card. The initrd will load from the pen drive which is the default disk during the boot.

I have found this process to be helpful. I now have the computer running the way I want it to. Oh, did I mention it doesn’t matter which netbook I grab, all I need is my SD card and the “key.” Also, it’s a neat trick to show off. Good Luck!

2 thoughts on “Booting Acer Aspire One from SD Card

  • December 28, 2015 at 3:12 pm
    Permalink

    In your article ‘booting-acer-aspire-one-from-sd-card’ you say the bios prevents direct booting from an SD card, I was going to follow your instructions, however I found it unnecessary. This is my setup.
    I have an Acer aspire E11 ES1-111M-C7DE Celeron processor N2840 2gig memory 250 GB HDD and have had no trouble installing xubuntu 14.04.1 to the SD card, however I found windows must be closed down via….run command ‘cmd’ then type ‘shutdown -s -t 00’
    Then on reboot hit the F2 key to enter bios, then in ‘BOOT’ change UEFI to Legacy, save the changes.
    I then Using the dd command on another Linux machine, I put the xubuntu 14.04.1 ISO image onto a 1Gb USB stick, I then started my Acer aspire E11 in Legacy mode, when running, I installed it to a 8Gb SD card using 6Gb for system and 2Gb for swap, when installation was complete and leaving the SD card in the slot I performed a normal restart and without any further key pushes it started up, I now am able to run windows ‘if necessary’ and the hard drive is not altered, grub is in the boot sector on the SD card, I hope you find the info useful.
    Regards ROB

    Reply
    • December 28, 2015 at 4:07 pm
      Permalink

      Thanks for the information, that is very useful. When I was trying this with the original Aspire One, the BIOS did not seem to be able to boot directly from the SD card.

      This would certainly be a much easier approach going forward with the new bios. Again…thanks for the advice.

      – Barry

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *