# mounting livecd.squashfs failed

## macinux

I added a new patched kernel to the live cd. But I got this error when I boot the system with this kernel:

"mounting /newroot/mnt/cdrom/livecd.squashfs on /newroot/mnt/livecd failed:

no such device."

If I do it menully, I can see more information: block device required.

Do I need to enable something in the kernel. I am using the default config file from genkernel to build the kernel (genkernel all)

Thanks a lot

----------

## rosmild

Hi, 

I've built my own livecd using this HOWTO http://gentoo-wiki.com/HOWTO_build_a_LiveCD_from_scratch,

but now I've the same problems, any solution?

Thanks, rosmild

----------

## rosmild

Sorry,

I've solved by myself....I've compiled squashfs as module.

rosmild

----------

## grunthus

I've been following the same HOWTO as rosmild mentioned in an earlier post. It sort of nearly works. I have two things I don't really understand about it though which I hope someone can explain:

1. Why do we compile two kernels in this HOWTO? The first one is copied as vmlinuz and the second one is copied by genkernel. I have never used genkernel until now, so I have no idea about why the liveCD needs two kernels to be prepared. I thought the genkernel one would be the important one.

2. The /boot/grub/menu.1st file which is presented has

```

kernel (cd)/boot/gee vga=788 root=/dev/ram0 init=/linuxrc looptype=squashfs loop=/livecd.squashfs udev nodevfs cdroot dodmraid

```

The build script does not generate a kernel by the name gee, so that is presumably a dummy - to be replaced by the genkernel one or the vmlinuz one?

Thanks!

----------

## rosmild

Hi gruntus,

you probably misunderstood, in this HOWTO the author presents two ways to gain the same result. One explains how to compile kernel using genkernel, the other how to compile kernel using standard mode. You can choose the way you prefer (I used genkernel).

As usually, sorry for my english.

rosmild

----------

## grunthus

Much appreciated rosmild,

I am going the genkernel way too. Right now I've completed my second dead CDROM, but that's just life when trying out something like this!

On this attempt, I've got the grub bit working better, however I still get the error

```
Invalid loop location: livecd.squashfs
```

What puzzles me in the size of the iso i'm burning is only around 7Mb:

```
-rw-r--r--  1 root root 7.9M Jan 17 12:39 /root/livecd/livecd.iso
```

I mounted the iso via

```

mount -t iso9660 -o loop /root/livecd/livecd.iso /dev/loop

```

And found the following:

```

bluemell loop # df --si /dev/loop

Filesystem             Size   Used  Avail Use% Mounted on

/root/livecd/livecd.iso

                       7.9M   7.9M      0 100% /dev/loop

bluemell loop # ls -al --si /dev/loop

total 6.2k

drwxr-xr-x   3 root root 2.1k Jan 17 12:39 .

drwxr-xr-x  18 root root  30k Jan 17 12:32 ..

drwxr-xr-x   3 root root 2.1k Jan 17 10:55 boot

-r--r--r--   1 root root 2.1k Jan 17 12:39 boot.catalog

-rw-r--r--   1 root root    0 Jan 17 12:39 livecd

bluemell loop # ls -al --si /dev/loop/boot

total 7.2M

drwxr-xr-x  3 root root 2.1k Jan 17 10:55 .

drwxr-xr-x  3 root root 2.1k Jan 17 12:39 ..

-rw-r--r--  1 root root    0 Oct 20 04:25 .keep

-rw-r--r--  1 root root 954k Jan 17 11:45 System.map-genkernel-x86-2.6.14-gentoo-r5

drwxr-xr-x  2 root root 4.1k Jan 16 09:54 grub

-rw-r--r--  1 root root 785k Jan 17 11:46 initramfs-genkernel-x86-2.6.14-gentoo-r5

-rw-r--r--  1 root root 2.8M Jan 17 11:45 kernel-genkernel-x86-2.6.14-gentoo-r5

-rw-r--r--  1 root root 2.8M Jan 17 10:51 vmlinuz

bluemell loop # 

```

So, it's the zero size /dev/loop/livecd entry which puzzles me along with no livecd.squashfs visible anywhere.

What do you think I am doing wrong?

----------

## rosmild

hi, 

please can you post your mkiso command line and your dir stucture?

rosmild[/code]

----------

## grunthus

The mkisofs line is the same as the one from the build script on the http://gentoo-wiki.com/HOWTO_build_a_LiveCD_from_scratch#Building_the_LiveCD

I've posted the last few lines, including the mkisofs line AND the mksquashfs line below. I thought, 'hmm - no livecd.squashfs is being created and that line mksquashfs is where its meant to happen!'. Well, guess what, my build host environment (i.e. outside the chroot) has no mksquashfs command. esearch squash reveals squashfs-tools is not installed. This looks like the culprit right??

mksquashfs issue:

```
bluemell livecd # mksquashfs 

-bash: mksquashfs: command not found

bluemell livecd # esearch squash

[ Results for search key : squash ]

[ Applications found : 1 ]

*  sys-fs/squashfs-tools

      Latest version available: 2.1_p2-r1

      Latest version installed: [ Not Installed ]

      Size of downloaded files: 191 kB

```

I will go ahead and try again now, however assuming this squashfs-tools to be a valid issue, I suppose it ought to be fed back into the original howto (which I am happy to do)

Here's the tail of the build script anyway:

```

...cut...

cd ${TARGET}/files

mksquashfs source/ ${TARGET}/livecd.squashfs

cd ${TARGET}

touch livecd

rm -rf ${TARGET}/files/

cd ${LIVECD}

mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -hide-rr-moved -c boot.catalog -o ${LIVECD}/livecd.iso ${TARGET}/
```

----------

## grunthus

OK, I'm through that problem. Emerging squashfs-tools in the host environment solved the livecd.squashfs error. I'll add a comment to the original howto.

I'm on to the next issue now which I will post separately since it is not relevant to this thread title. (Grub error 19)

Thanks!

----------

