4

I'm trying to create a custom Debian liveCD using live-helper, but offline. It was more or less possible with apt-cdrom (using the official DVDs to solve all the dependencies).

I did lh config and then lh build, like I'm supposed to. Problem is it failed and gave me this error:

E: Failed getting release file: http://ftp.de.debian.org/debian/dists/squeeze/Release

I poked around the internet and found an option about --mirror-bootstrap and using it to redirect to http://localhost/debian, but it gives the same error. I even tried fetching the Release file and using a local path (eg /root/debian/dists/squeeze/Release), but it wouldn't recognize it. I seem to need to use a URL, but I can't use a url to redirect to local hard drive.

I did find this though: http://lists.debian.org/debian-live/2007/07/msg00152.html
I didn't find any solution there, but it's the most information I could find.

I can't connect that computer to the internet, what can I do??

user
  • 121
  • Are you running a web server? – tshepang May 31 '11 at 14:58
  • nope. Just basic Debian, not even with a GUI. – user May 31 '11 at 15:26
  • Run a web server (I recommend cherokee... for your purpose, it won't need any setup), add a link to your local repository (sudo ln -s /root/debian /var/www), and try again. – tshepang May 31 '11 at 16:20
  • the hell? why does it have to be so complicated? – user Jun 05 '11 at 05:29
  • It's just two steps... install a web server and tell it where your repository is located. – tshepang Jun 05 '11 at 12:39
  • Trying this solution, I got stuck while trying to download ftp.de.debian.org/debian/dist/squeeze . No matter what I try with wget, I only get the index.html file. Any ideas? There are more files that Release required. – user Jun 06 '11 at 09:32
  • I forgot to mention that with the web server, your APT entry will be deb http://localhost/debian squeeze main or somesuch. – tshepang Jun 06 '11 at 09:45
  • Without the web server, you can have this in your APT source entry, deb file://root/debian squeeze main. – tshepang Jun 06 '11 at 09:46
  • why can't it just use the apt-cdrom source? How do I get an offline repository then? How is that any different from the release-DVDs? – user Jun 15 '11 at 10:32

1 Answers1

2

These instructions assume that you want to create a live disc from just one Debian DVD (or CD). I don't know how to combine different CD/DVD images to be one repository.

  1. Install a web server:

    sudo apt-get install cherokee
    
  2. Create a mount point on the web server path and mount the disc:

    sudo mkdir /var/www/squeeze
    sudo mount /dev/scd0 /var/www/squeeze
    
  3. Create a directory which will contain the configs and the live disc and navigate to it:

    mkdir /path/to/live-build-dir
    cd /path/to/live-build-dir
    
  4. Run live-build config generator:

    lb config --mirror-bootstrap http://localhost/squeeze
    

    Look at lb_config manpage for a myriad other options. Also, ensure to wipe out your config directories if you re-run lb config command. Look at the docs for an explanation.

  5. Build the live disc:

    sudo lb build
    

NOTES:

  • I've tried with direct file access (file:/path/to/apt-repository), and it doesn't work. Probably a bug.

  • If you want to build Squeeze images, use the Squeeze version of live-build. The version in Wheezy or Unstable is currently broken, and the developers discourage it's usage, other than for testing. The config formats are not even compatible.

tshepang
  • 65,642
  • I'm going in this direction, I got cherokee working and files there seem to work. How do I get a local repository? I'm not 100% sure what does it mean, can you explain in a sentence? (like, do I run apt-local get_repository or something?) I got a local repository in the form of the installation DVD, and someone mentioned I can mount them to /var/www/, how do I do that? (just mount /dev/hdc /var/www apt-repository?) – user Jun 15 '11 at 17:04
  • I added the info addressing your question on the Answer. – tshepang Jun 15 '11 at 17:53
  • It failed on "installing base packages", specifically isc-dhcp-common. bah. What now? – user Jun 16 '11 at 05:27
  • Can you update your post with the exact error message as well as the exact disc (e.g. Debian 6.0.1 disc1). – tshepang Jun 16 '11 at 06:49
  • Debian stable 6.0.0 DVD1. Error message: W: Failure while installing base packages. This will be re-attempted up to five times, and this happened just after I: Upacking isc-dhcp-common, and also last time it failed on that. I'm downloading 6.0.1a and I'll try that, but I doubt that will make a change. – user Jun 17 '11 at 05:49
  • How did it go? What/when is last time? – tshepang Jun 20 '11 at 08:50
  • what do you mean? it tried five times (to unpack isc-dhcp-common, I guess), and failed. – user Jun 20 '11 at 11:20
  • That's what I meant. – tshepang Jun 20 '11 at 11:23
  • Did 6.0.1a work? – tshepang Jun 20 '11 at 11:23
  • bugger, not even 6.0.1a – user Jun 20 '11 at 16:00
  • Give me some time so I can try reproduce your problem. – tshepang Jun 20 '11 at 16:23
  • I get stuck even earlier than you: E: Failed getting release signature file... Release.gpg. This happens very early on. How did you get past it? – tshepang Jun 21 '11 at 21:59
  • you probably misspelled the localhost url, try wgeting it. Make sure it's where live-helper is expecting it. – user Jun 22 '11 at 08:20
  • @user: I didn't because it could get the Release file. – tshepang Jun 22 '11 at 12:16
  • huh, I see, odd. Try adding the disc to sources.list file by using apt-cdrom add when the disc is in the tray. If all goes well, I think the ...localhost/... URL is wrong. Check the default url..? – user Jun 22 '11 at 14:40
  • anything..? Why is this so complex? The problem is said to be in debootstrap, can I file a bug over there..? – user Jun 29 '11 at 11:22
  • I strongly suspect that running debootstrap with --no-check-gpg option would solve the issue. – tshepang Jun 29 '11 at 13:34
  • @user: sorry I missed this message. My point was that if it could check for Release file, then there's nothing wrong with my url settings. Anyways, how would adding cdrom as source help? – tshepang Jun 29 '11 at 13:36
  • if debootstrap would use the source.list file.. then all is well, as all the packages are there. The Apt system is so great because it has all the tools developed over time, and not some self written hack to read an online repository... – user Jul 06 '11 at 07:51