# Using usb as disk, a root error mount

## yermandu

Hello everone,

Im trying install gentoo in a usbstick, aka pendrive, i used gentoo as host and create a new partition in hard-disk to make a new installation, that i call "PREINSTALL" with some changes and some tools that i need. After the changes and install i move the preinstallation to usbstick

To put the system in a usbstick i can make two choices 

Squashfs

So i compress the system PREINSTALL using mksquashfs with standard  command: 

```
mksquashfs target liveusb.squashfs
```

And then copy to root dir from usbstick

Single Copy

I just go to dir where system PREINSTALL are, and copy to root dir from usbstick

Now we need install some bootloader. 

I prefer use extlinux instead grub or syslinux

Its very simple to configure

lets call the usbstick the /dev/sdd1 device

I put the extlinux.conf at /extlinux/ and set with the follow parameters 

```
label USB Gentoo

  MENU LABEL ^USB Gentoo

  kernel vmlinuz

  append root=/dev/loop0 init=/bin/sh dokeymap looptype=squashfs loop=/liveusb.squashfs scandelay=12 docache initrd=initram.img

```

Now its my problem

The kernel can not find the root partition and uncompress the squashfs these are the dmesg.log

```
[    5.753717] dracut Warning: Cannon detect filesystem type for device /dev/loop0

[    5.758170] bio too big device loop0 (2 > 0)

[    5.760094] EXT3-fs (loop0): error: unable to read superblock

[    5.767112] bio too big device loop0 (2 > 0)

[    5.769039] EXT2-fs (loop0): error: unable to read superblock

[    5.782091] bio too big device loop0 (2 > 0)

[    5.784023] EXT4-fs (loop0): unable to read superblock

[    5.795126] bio too big device loop0 (2 > 0)

[    5.797066] SQUASHFS error: squashfs_read_data failed to read block 0x0

[    5.799069] SQUASHFS error: unable to read squashfs_super_block

[    5.821358] dracut: Remounting /dev/loop0 with -o ro,

[    5.825141] bio too big device loop0 (2 > 0)

[    5.827105] EXT3-fs (loop0): error: unable to read superblock

[    5.832107] bio too big device loop0 (2 > 0)

[    5.834073] EXT2-fs (loop0): error: unable to read superblock

[    5.847117] bio too big device loop0 (2 > 0)

[    5.849072] EXT4-fs (loop0): unable to read superblock

[    5.856128] bio too big device loop0 (2 > 0)

[    5.858026] SQUASHFS error: squashfs_read_data failed to read block 0x0

[    5.859931] SQUASHFS error: unable to read squashfs_super_block

[    5.872363] dracut: mount: /dev/loop0: can't read superblock

[    5.878485] dracut Warning: Cannon detect filesystem type for device /dev/loop0

[    5.882953] bio too big device loop0 (2 > 0)

```

I try change the boot parameter "root=auto" but my kernel can not understand auto 

I suspect that my problem is pass to the boot parameter where is locate exactly the squashfs ... or not,  some idea?

The problem for single copy way is that dev can change it can be sdd1 or sdc1 or sdb1 , or other.

How parameter i can use to boot the device? , in most cases root=/dev/sdc1 are fine.

----------

## whig

Placing gentoo on a pendrive has been done. The usual way is to use sys-kernel/genkernel, see the guide for it. I used a specific hack to suit my needs.

----------

