LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-10-2009, 08:07 PM   #1
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
Building using live CD - device mapper error


Hi,

Currently building LFS on an old machine, using the LFS live CD. However, I've run into what may turn out to be a major-ish hitch. After many hours of compiling gcc, it appears to have crashed out with:
Code:
device-mapper: snapshots: Invalidating snapshot: Error reading/writing
Buffer I/O/ error on device dm-0, logical block 208921
Buffer I/O error on device dm-0, logical block 0
EXT2-fs error (device dm-0): ext2_free_branches: Read failure, inode=98729, block=208921
<More Buffer I/O errors>
This seems to be an inherent problem when making heavy use of live distros - see Red Hat bug report. So:
  1. I could just try again (and keep my fingers crossed), or
  2. Install a very lightweight distro into the spare space on the disk (I have approx 6 gigs free, but only 48MB RAM on this PC), or
  3. Do the initial build to first boot, with the drive hooked up to another PC (means that the initial tool-chain won't be built on the target processor, though)
Which would be best? For option 2, I could install DSL, but it doesn't come with any development tools and I couldn't tell the Kernel version from a quick glance. Puppy looks to be definitely out of my league. Has anyone any other suggestions?

Edited to add: Another idea occurred - how about if I copied the contents of the CD's /bin, /usr/bin (etc) to a directory on the hard drive, and then either modified $PATH or created links to those directories in /? A bit late to try it now, but has anyone any idea whether that would work?

Yours,
Rob

Last edited by Robhogg; 04-10-2009 at 08:21 PM.
 
Old 04-11-2009, 05:17 AM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Original Poster
Rep: Reputation: 97
Trying the last approach. I've copied the contents of /bin and /usr/bin to $LFS/bin_tmp and $LFS/usr/bin_tmp. Had to use -P flag on cp, as so many of the files were actually soft links, and there were a couple that were relative links outside these directories (rcs2log and killall5) - I created similar _tmp directories, and copied across the targets.

I then modified $PATH (the unionfs wouldn't let me replace /bin and /usr/bin with soft links):

export PATH=/tools/bin:/mnt/lfs/bin_tmp:/mnt/lfs/usr/bin_tmp:/bin:/usr/bin

I've started the compilation of gcc again, while reciting the prayer of the sys-admin:
Quote:
Oh, pleasepleasepleasepleaseplease...
The CD-ROM drive is still working, of course, as I haven't tried to copy across all the dependencies of the various utilities, but if I open another virtual terminal, the system is a lot more responsive than it was last night.

Last edited by Robhogg; 04-11-2009 at 05:18 AM.
 
Old 04-11-2009, 05:24 PM   #3
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Original Poster
Rep: Reputation: 97
No joy, I'm afraid. After 11h29mins, the process exited reporting errors. According to the Debian web-site, it is possible to install in only* 44MB, so I'm going to try a minimal install in the spare space on the disk, and do the build with that.

* Eee... when I were a lad, if something had 8MB of RAM and an 80MHz processor, we thought it were a supercomputer!
 
Old 04-12-2009, 04:06 PM   #4
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Original Poster
Rep: Reputation: 97
Tch! Couldn't get Debian 5 to install at all! Have gone for the final option. Connected the HD up to another machine (Athlon XP, ¾GB RAM running CentOS). So far, so good. Have built gcc and glibc, and they passed the sanity check! What's more, the compile of gcc took less than 20 minutes .

If anyone else is in a similar position, I found a document to take me through the intricacies of cross-compiling on the LFS web-site. Looks like it's for an earlier version of LFS, but no major problems yet.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mkrescue Fatal: device-mapper: only linear boot device supported Molly Slackware 5 01-06-2009 04:35 PM
device mapper / multipath creating extra device, won't let me talk to the one i want chakkerz Linux - Server 1 03-16-2008 05:52 PM
device-mapper and DMA write timed out: error tajo01 Linux - Software 0 05-08-2006 03:14 AM
trying to install/boot 2.6.15 kernel - device mapper error jmike1 Linux - Software 2 03-15-2006 09:49 PM
Help please to mount windows partitions - device-mapper: error adding target to table Indian_bee Linux - General 3 07-06-2004 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration