[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Running Debian from a USB-drive on a Cubox-i 4



Hi Vagrant

On Saturday 21 November 2015 13:05:48 Vagrant Cascadian wrote:
> 
> > I've installed Jessie from the Jessie d-i image, putting /boot on the SD card
> > and / on a external USB drive. Installation went smooth but the initial reboot
> > did not detect the USB drive.
> 
> Ah yes, ran into this recently with the Wandboard and Odroid-XU4:
> 
>   https://bugs.debian.org/762634
> 
> > Next reboot, I set bootargs from u-boot command line to specify to the kernel
> > where is the root file system with:
> >
> > CuBox-i U-Boot > setenv bootargs root=/dev/sda1 rootfstype=ext4 rootwait rw console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32
> > CuBox-i U-Boot > boot
> ...
> > Gave up waiting for root device.  Common problems:
> >  - Boot args (cat /proc/cmdline)
> >    - Check rootdelay= (did the system wait long enough?)
> >    - Check root= (did the system wait for the right device?)
> >  - Missing modules (cat /proc/modules; ls /dev)
> > ALERT!  /dev/sda1 does not exist.  Dropping to a shell!
> > modprobe: module i8042 not found in modules.dep
> > modprobe: module uhci-hcd not found in modules.dep
> >
> >
> > My USB hard drive is not detected, probably because module uhci-hcd is not
> > loaded. I've checked and this module is not available in the initramfs. The
> > only reference I've found is in /lib/modprobe.dep/aliases.conf:
> 
> I bet you just need to add the modules to /etc/initramfs-tools/modules
> and rebuild the initramfs:
> 
>   ci_hdrc_imx
>   phy_mxs_usb
> 
> Those modules are loaded on my Cubox-i4pro, and it worked for a
> Wandboard Dual, which is very similar hardware to the Cubox-i.
> 
> 
> live well,
>   vagrant

Thanks for your help; i've been able to boot from the USB hard drive tonight.


For memory, here are the steps I had to follow to solve the problem. Perhaps
there are better ways to get the result, but it worked for me.

Objective: Install Debian Jessie on a USB hard drive for a Cubox-i 4Pro

Steps:
1. On a linux host, create a bootable SD card with Debian installer image from
http://ftp.us.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/SD-card-images/
as explained in the README
(http://http.us.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/SD-card-images/README.concatenateable_images)

zcat firmware.MX6_Cubox-i.img.gz partition.img.gz > complete_image.img
cat complete_image.img > /dev/sdX (X was b on my computer)

2. Put the SD card into the Cubox-i slot and run Debian installer and install
Jessie on the SD card.

3. When completed, log in as root and check that it works correctly before
creating a new initramfs.

Add the 2 modules:
  ci_hdrc_imx
  phy_mxs_usb
to /etc/initramfs-tools/modules and rebuild the initramfs:

update-initramfs -u -t

4. Shutdown linux and mount the SD card on the linux host. Backup the content
of the /boot directory.

5. Copy again the Debian installer on the SD card.
cat complete_image.img > /dev/sdX

6. Put the SD card on the Cubox, with the USB hard drive plugged, boot but now
install Debian on the hard drive. When asked for partitioning, select manual
partitioning and place / on the hard drive and /boot on the SD card.

7. At the end of the installation, reboot and stop U-boot boot process
by pressing a key during the 3 seconds count down. Type:

setenv bootargs root=/etc/sda1 rootfstype=ext4 rootwait rw video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32
saveenv
reboot

8. Oups! it does not boot with the messages:

Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/sda1 does not exist.  Dropping to a shell!
modprobe: module i8042 not found in modules.dep
modprobe: module uhci-hcd not found in modules.dep

9. Place the SD card in the linux host and overwrite the files in the /boot
directory by the files that you saved at step #4 (the new initramfs image
with the missing drivers).

10. Insert again the SD in the Cubox-i and power it. Now it should boot from
the hard drive. Check that the root filesystem is on the USB drive:

df - h


I hope I haven't missed any critical information.

--
Pierre


Reply to: