LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-30-2010, 05:08 PM   #1
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Rep: Reputation: 15
How do I add a repository to a live cd?


I'm trying to make a live cd with my repository added. I added the usual lines to /etc/apt/sources.list, added the signing key, then installed and updated some packages. But when I installed the CD, plymouth had reverted to Ubuntu's version, and although other packages were still installed, apt-getting the source would download the Ubuntu version. My unique packages behaved normally. I checked the sources file and my repository was no longer there.
 
Old 05-30-2010, 05:22 PM   #2
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
Quote:
Originally Posted by Muscovy View Post
I'm trying to make a live cd with my repository added. I added the usual lines to /etc/apt/sources.list, added the signing key, then installed and updated some packages. But when I installed the CD, plymouth had reverted to Ubuntu's version, and although other packages were still installed, apt-getting the source would download the Ubuntu version. My unique packages behaved normally. I checked the sources file and my repository was no longer there.
Try using APTonCD or the Ubuntu Customization Kit; both of these tools should work. I would try UCK first to create the CD and then APTonCD to add the repository to the disk. You can also just use APTonCD to create a non-bootable disk with just your repo on it.
 
Old 05-30-2010, 05:47 PM   #3
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Original Poster
Rep: Reputation: 15
Is there a way I can do it manually?
 
Old 05-30-2010, 06:59 PM   #4
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
Quote:
Originally Posted by Muscovy View Post
Is there a way I can do it manually?
If you have to put the repository locally on the CD, not easily. But if you link to an online repository, you can rebuild the casper image with a custom /etc/apt/sources.list and then boot the CD and see what you get.
 
Old 06-02-2010, 09:01 PM   #5
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Kenny_Strawn View Post
If you have to put the repository locally on the CD, not easily. But if you link to an online repository, you can rebuild the casper image with a custom /etc/apt/sources.list and then boot the CD and see what you get.
Rebuilding casper! Sounds just like what I didn't do. How would I do that?
 
Old 06-05-2010, 12:42 PM   #6
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Original Poster
Rep: Reputation: 15
I can't manage to find anything on how to rebuild casper. I found how to rebuild the initrd.gz image, but that didn't help. I tried looking at the source of casper, and found nothing useful.
 
Old 06-05-2010, 01:44 PM   #7
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
You would have to use the Ubuntu Customization Kit, which does it for you. Otherwise, it would be way too hard.

For instructions on how to do it without:

http://www.linaccess.com/index.php?o...build&Itemid=5
 
Old 06-05-2010, 09:36 PM   #8
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Kenny_Strawn View Post
You would have to use the Ubuntu Customization Kit, which does it for you. Otherwise, it would be way too hard.

For instructions on how to do it without:

http://www.linaccess.com/index.php?o...build&Itemid=5
I've already been building manually for a while with this guide. I don't see anything about the sources.list in this guide. I tried looking at the source of the Ubuntu Customization Kit, but didn't see how that did it either.


Edit: I found this line in the source code.
Quote:
Note 3: sources.list changes are not propagated to installed system.
So no leads yet. :|

Last edited by Muscovy; 06-05-2010 at 09:40 PM.
 
Old 06-05-2010, 11:29 PM   #9
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
Quote:
Originally Posted by Muscovy View Post
I've already been building manually for a while with this guide. I don't see anything about the sources.list in this guide. I tried looking at the source of the Ubuntu Customization Kit, but didn't see how that did it either.


Edit: I found this line in the source code.

So no leads yet. :|
The reason why the sources.list is not propagated to the installed system is because, once built, the casper is read-only. You have to rebuild /casper/filesystem.squashfs with a custom sources.list to be able to add your repository.

And just out of curiosity: Is it a PPA you are trying to add, or a totally different repo altogether? I have looked for a /muscovy PPA, to no avail.

Edit: And the Ubuntu Customization Kit is to make the repository local (as in the /pool directory on the CD) so that the CD doesn't have to go online to find it.

And the LinAccess link does mention the rebuilding of casper, while the help.ubuntu.com link doesn't.

If you want to see a help.ubuntu.com equivalent:

https://help.ubuntu.com/community/Li...ionFromScratch

Last edited by Kenny_Strawn; 06-05-2010 at 11:44 PM. Reason: Added information about the LinAccess link
 
Old 06-06-2010, 11:51 AM   #10
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Original Poster
Rep: Reputation: 15
After doing much more looking, it seems casper has nothing to do with this. Rebuilding casper, unless I'm severely mistaken, isn't a part of the problem.

I looked through the source of ubiquity and found a lot of stuff to suggest it's to be added in there, to be available in the installed system, instead of just the live boot.

I hope I'm not jumping the rails with this. :|


Edit: It's definitely something in the apt-setup component of ubiquity. Also, it is a PPA I'm adding.


Edit2: apt-setup/release-files contains the archives that are added after installation. However, I'm still figuring out how to make one of the files myself.
Code:
Origin: Ubuntu
Label: Ubuntu
Suite: lucid-updates
Version: 10.04
Codename: lucid
Date: Thu, 29 Oct 2009 17:25:41 UTC
Architectures: amd64 armel i386 ia64 lpia powerpc sparc
Components: main restricted universe multiverse
Description: Ubuntu Lucid Updates
MD5Sum:
 d41d8cd98f00b204e9800998ecf8427e                0 main/binary-amd64/Packages
 c5c034c4d2bb46ac65e1aa98bbae3acf              103 main/binary-amd64/Release
 4a4dd3598707603b3f76a2378a4504aa               20 main/binary-amd64/Packages.gz
 4059d198768f9f8dc9372dc1c54bc3c3               14 main/binary-amd64/Packages.bz2
 d41d8cd98f00b204e9800998ecf8427e                0 main/binary-armel/Packages

(Lots more)

Edit3: I found the file in the PPA. Now for the next dilemma: there's already a folder and archive called "lucid" added.

Last edited by Muscovy; 06-06-2010 at 12:16 PM. Reason: apt-setup
 
Old 06-06-2010, 12:44 PM   #11
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
From http://help.ubuntu.com/community/Liv...ionFromScratch:

Quote:
You may edit the sources.list in the chroot to add a line from a PPA, if you need. You will need to add the PPA's key to your chroot's package manager. On the PPA's overview page you'll see the PPA's OpenPGP key id. It'll look something like this: 1024/12345678. Copy it, or make a note of, the portion after the slash, e.g: 12345678. This key will be added once we enter the chroot.

Code:
sudo chroot chroot

mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export HOME=/root
export LC_ALL=C
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 12345678  #Substitute "12345678" with the PPA's OpenPGP ID.
apt-get update
apt-get install --yes dbus
dbus-uuidgen > /var/lib/dbus/machine-id
What you have to do is debootstrap a directory, copy some config files (including your sources.list with the PPA) into that directory, and then chroot into that directory, adding your PPA'a GPG key once you're in. And then, you can install ubuntu-desktop to the chroot, clean up and exit. Then, build casper out of the chroot.

Last edited by Kenny_Strawn; 06-06-2010 at 01:27 PM.
 
Old 06-06-2010, 06:02 PM   #12
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Original Poster
Rep: Reputation: 15
I'm trying this now.

Edit: It's ready and I'm putting it on a drive. I hope this works...

Edit2: It failed, and looking at the documentation, I don't see how this does anything working from an existing CD can't. Apt-setup is still needed.

Last edited by Muscovy; 06-06-2010 at 08:53 PM.
 
Old 06-07-2010, 01:45 PM   #13
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Original Poster
Rep: Reputation: 15
Just to clarify, even though the documentation for editing an existing live cd doesn't mention editing sources.list, I've still been doing it. I didn't see anything in apt-setup that supports editing sources.list manually at all.
Files in apt-setup/release-files (apt-setup is in ubiquity) are templates for new repositories to add. It rebuilds sources.list upon install.
 
  


Reply

Tags
apt, livecd, repository, ubuntu



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
How to add repository in centos 5.3 for nagios towhidtech Linux - Newbie 3 02-23-2010 09:32 AM
how to add yast repository olva SUSE / openSUSE 4 08-27-2008 05:31 AM
add usb repository to apt? jmite Linux - Newbie 2 08-16-2008 07:19 PM
add Repository to debian alsharifhoussam Linux - Software 1 12-21-2006 04:14 AM
Building Live-CD repository microsoft/linux Linux - General 3 04-15-2005 10:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:25 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