Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Creating LiveCD with Catalyst, failure to mount /dev/loop0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Wed Aug 20, 2008 1:53 am    Post subject: Creating LiveCD with Catalyst, failure to mount /dev/loop0 Reply with quote

I have tried making a LiveCD with Catalyst, following the guide on the gentoo-wiki.com site, making a few changes as needed for my needs. I am trying to create a LiveCD environment that will load my networking settings, and essentially act as a wireless adapter for my Xbox 360. I have made the LiveCD a few times, with minor modifications in an attempt to get it to boot, but every time I load it in my laptop, it displays an error saying it failed to mount /dev/loop0. I've tried using other compressions besides squashfs, but the build of the iso fails, saying that the directory structure is too deep.

Here is my livecd-stage1.spec file:
Code:
subarch: i686
version_stamp: 2008.0
target: livecd-stage1
rel_type: default
profile: default/linux/x86/2008.0/server
snapshot: 2008.0
source_subpath: stage3-i686-2008.0
portage_confdir: /etc/portage
pkgcache_path: /tmp/packages

livecd/use: -kde -gnome -X -cups -arts livecd madwifi -ipv6 -gpm
livecd/packages: baselayout dhcpcd acpid e2fsprogs ethtool hwsetup nano links less logrotate syslog-ng iputils device-mapper


and here is my livecd-stage2.spec file:
Code:
subarch: i686
version_stamp: 2008.0
target: livecd-stage2
rel_type: default
profile: default/linux/x86/2008.0/server
snapshot: 2008.0
source_subpath: default/livecd-stage1-i686-2008.0
portage_confdir: /etc/portage
pkgcache_path: /tmp/packages
kerncache_path:
livecd/fstype: squashfs
livecd/fsops:
livecd/cdtar: /usr/lib/catalyst/livecd/cdtar/isolinux-3.09-memtest86+-cdtar.tar.bz2
livecd/iso: /tmp/livecd.iso
livecd/fsscript:
livecd/splash_theme:
livecd/bootargs: dokeymap
livecd/gk_mainargs:
livecd/linuxrc:
livecd/type: generic-livecd
livecd/readme:
livecd/motd:
livecd/modblacklist:
livecd/rcadd:
livecd/rcdel:
livecd/overlay:
livecd/root_overlay:
livecd/xinitrc:
livecd/xdm:
livecd/xsession:
livecd/users:
livecd/volid: Gentoo Linux 2008.0 i686
gamecd/conf:
boot/kernel: gentoo
boot/kernel/gentoo/sources: =sys-kernel/gentoo-sources-2.6.22*
boot/kernel/gentoo/config: /tmp/livecd-2.6.22.config
boot/kernel/gentoo/gk_kernargs:
boot/kernel/gentoo/use: -X
boot/kernel/gentoo/extraversion:
boot/kernel/gentoo/packages: wireless-tools madwifi-ng madwifi-ng-tools
boot/kernel/gentoo/machine_type:
boot/kernel/gentoo/console:
livecd/unmerge: autoconf automake bin86 binutils libtool m4 bison ld.so make perl patch linux-headers man-pages sash bison flex gettext texinfo ccache distcc addpatches man groff lib-compat miscfiles rsync sysklogd bc lcms libmng genkernel diffutils libperl gnuconfig gcc-config gcc bin86 cpio cronbase ed expat grub lilo help2man libtool gentoo-sources
livecd/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /usr/portage /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /root/.ccache /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/bootsplash/gentoo /etc/bootsplash/gentoo-highquality /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
livecd/rm: /lib/*.a /usr/lib/*.a /usr/lib/gcc-lib/*/*/libgcj* /etc/dispatch-conf.conf /etc/etc-update.conf /etc/*- /etc/issue* /etc/make.conf /etc/man.conf /etc/*.old /root/.viminfo /usr/sbin/bootsplash* /usr/sbin/fb* /usr/sbin/fsck.cramfs /usr/sbin/fsck.minix /usr/sbin/mkfs.minix /usr/sbin/mkfs.bfs /usr/sbin/mkfs.cramfs /lib/security/pam_access.so /lib/security/pam_chroot.so /lib/security/pam_debug.so /lib/security/pam_ftp.so /lib/security/pam_issue.so /lib/security/pam_mail.so /lib/security/pam_motd.so /lib/security/pam_mkhomedir.so /lib/security/pam_postgresok.so /lib/security/pam_rhosts_auth.so /lib/security/pam_userdb.so /usr/share/consolefonts/1* /usr/share/consolefonts/7* /usr/share/consolefonts/8* /usr/share/consolefonts/9* /usr/share/consolefonts/A* /usr/share/consolefonts/C* /usr/share/consolefonts/E* /usr/share/consolefonts/G* /usr/share/consolefonts/L* /usr/share/consolefonts/M* /usr/share/consolefonts/R* /usr/share/consolefonts/a* /usr/share/consolefonts/c* /usr/share/consolefonts/dr* /usr/share/consolefonts/g* /usr/share/consolefonts/i* /usr/share/consolefonts/k* /usr/share/consolefonts/l* /usr/share/consolefonts/r* /usr/share/consolefonts/s* /usr/share/consolefonts/t* /usr/share/consolefonts/v* /etc/make.conf.example /etc/make.globals /etc/resolv.conf


Anyone know why it would be saying that it can't mount the image?
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Wed Aug 20, 2008 2:13 am    Post subject: Reply with quote

did you enable loopback block devices in your kernel?
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Wed Aug 20, 2008 3:49 am    Post subject: Reply with quote

I would assume it is, but I did not check. I am using the config from the 2007 LiveCD, as described by the HOWTO on the wiki.

What's the variable in the config file?
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Wed Aug 20, 2008 3:50 am    Post subject: Reply with quote

CONFIG_BLK_DEV_LOOP
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Wed Aug 20, 2008 3:54 am    Post subject: Reply with quote

I have CONFIG_BLK_DEV_LOOP=y, and CONFIG_BLK_DEV_CRYPTOLOOP not set. Does the cyrptoloop need to be enabled?
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Wed Aug 20, 2008 3:55 am    Post subject: Reply with quote

nope, but make sure that /dev/loop0 actually exists.
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Wed Aug 20, 2008 4:01 am    Post subject: Reply with quote

When it fails, I get a console prompt. I've checked the main root and it does list /dev/loop0. Properties are brw-rw----. And yes, the directory it is trying to mount to also exists, which is /newroot/mnt/livecd.
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Wed Aug 20, 2008 4:28 am    Post subject: Reply with quote

Could it have anything to do with me building an x86 LiveCD on an amd64 system?
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Fri Aug 22, 2008 6:55 am    Post subject: Reply with quote

Does anyone else know why I can't boot from my LiveCD? I've tried it on another laptop and I get the same problem, so I know it's not the computer.

Some other information, the error is coming up while it's booting. It tries to mount the squashfs filesystem, then displays the error "!! Failed to $1; falling back to the shell..."

I've tried searching around, but not able to find any help on this.
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Fri Aug 22, 2008 1:21 pm    Post subject: Reply with quote

does your kernel actually have support for the filesystem?
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Sat Aug 23, 2008 1:33 am    Post subject: Reply with quote

Both the kernel I have installed on my system and the kernel that is on the livecd have CONFIG_SQUASHFS=y.
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Thu Sep 04, 2008 8:48 am    Post subject: Reply with quote

I just wanted to say thank you for posting this thread.

I've written a custom script based on the HOWTO build a LiveCD from scratch from Gentoo-Wiki.com

Recently (in the last couple of days) my builds have all failed with this error:

Code:
>> Mounting squashfs filesystem
mount: mounting /dev/loop0 on /newroot/mnt/livecd failed: No such device


I am using the exact same kernel config as a working system used and this error has now crept in.

I'm assuming its something to do with Genkernel as that is where this part of the boot process is from.

I'm trying a ~x86 version today to see if it helps!

So, your not the only one with this problems, and chances are your catalyst and kernel config is 100% ok.
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Thu Sep 04, 2008 11:58 am    Post subject: Reply with quote

I think I may have found a fix.

In the area where you activate squash FS you can set a cache number.

If you have this set to anything below 3 it seems to have problems mounting the squashfs file.
also, I needed to reduce the max size of my ramdisk from 8192 down to 4096.

In my kernel I had this:

Code:
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
CONFIG_BLK_DEV_RAM_SIZE=8192


and I now have this

Code:
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
CONFIG_BLK_DEV_RAM_SIZE=4096


It's booted ok this time! so one of them fixed it!
Back to top
View user's profile Send private message
xathin
n00b
n00b


Joined: 05 Sep 2006
Posts: 64
Location: Vancouver, BC

PostPosted: Thu Sep 04, 2008 4:24 pm    Post subject: Reply with quote

I'll give it a try and see if it fixes the problem on my end as well.

Just a quick question, were you using a kernel config originally generated from a livecd build, or one that you made from scratch?
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Thu Sep 04, 2008 6:14 pm    Post subject: Reply with quote

xathin wrote:
I'll give it a try and see if it fixes the problem on my end as well.

Just a quick question, were you using a kernel config originally generated from a livecd build, or one that you made from scratch?


I'm using one I've created from scratch. Well, I say from scratch, I'm using genkernel so its one based on the default genkernel config.
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Tue Jun 16, 2009 10:13 pm    Post subject: Reply with quote

Try using squashfs-tools-3.x rather than squashfs-tools-4.0

The current 2.6.28 kernels don't support a squashfs-4.x filesystem
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum