I have updated my instructions on how to roll your own CentOS-4 Live CD. I also made a script which does it all for you. I have also got instructions on how to turn the Live CD into a PXE bootable Live version.
All the details can be found here: http://www.byteclub.net/wiki/CentOS_Live
John.
On 8/9/06, John Newbigin jnewbigin@ict.swin.edu.au wrote:
I have updated my instructions on how to roll your own CentOS-4 Live CD. I also made a script which does it all for you. I have also got instructions on how to turn the Live CD into a PXE bootable Live version.
All the details can be found here: http://www.byteclub.net/wiki/CentOS_Live
John.
Great! I was just looking for this! Unfortunately there seems to be something missing: by the time we run the first yum command, there's no distroverpkg package installed under $LIVE to query for $releasever. My output is: -------------- # yum -c $LIVE/etc/yum.conf --installroot=$LIVE install yum Setting up Install Process Setting up repositories not using ftp, http[s], or file for repos, skipping - Null is not a valid release or hasnt been released yet Cannot find a valid baseurl for repo: update Error: Cannot find a valid baseurl for repo: update --------------- Should the user install centos-release RPM with prefix equal to $LIVE beforehand? Or is there any other easy but correct way to pass this variable to yum?
Depending on the shell you are using the document tells you to set $LIVE first before yum. "make a new directory to build in
* LIVE=/tmp/livecd * mkdir $LIVE " then $LIVE would be /tmp/livecd based on what is set above. That should work fine in BASH but I remember a few shells that set variables different but can't remember the specifics off the top of my head.
-- William
On 8/10/06, William Suffill william.suffill@gmail.com wrote:
Depending on the shell you are using the document tells you to set $LIVE first before yum. "make a new directory to build in
* LIVE=/tmp/livecd * mkdir $LIVE "
then $LIVE would be /tmp/livecd based on what is set above. That should work fine in BASH but I remember a few shells that set variables different but can't remember the specifics off the top of my head.
Yes, I have set LIVE.
"Eduardo Grosclaude" eduardo.grosclaude@gmail.com wrote:
Great! I was just looking for this! Unfortunately there seems to be something missing: by the time we run the first yum command, there's no distroverpkg package installed under $LIVE to query for $releasever.
Should the user install centos-release RPM with prefix equal to $LIVE beforehand? Or is there any other easy but correct way to pass this variable to yum?
I got around this by editing my yum repo files to replace $releasever with 4. Which is horrible, so I too would like to know if there's a better way.
I still can't get it to work, though. I do get about 90MB of stuff installed, as promised, but there are lots of '%post(...) scriptlet failed' messages during the installation. Although many things are installed into the chroot area there are clearly some things missing. The first command I typed in the chroot was 'ls', but /bin/ls isn't there even though, according to yum.log, coreutils was installed.
Actually, I was able to scroll back far enough to see this during the installation:
error: %pre(coreutils-5.2.1-31.2.i386) scriptlet failed, exit status 255 error: install: %pre scriptlet failed (2), skipping coreutils-5.2.1-31.2
Ron
On Fri, 2006-08-11 at 15:49 +0100, Ron Yorston wrote:
"Eduardo Grosclaude" eduardo.grosclaude@gmail.com wrote:
Great! I was just looking for this! Unfortunately there seems to be something missing: by the time we run the first yum command, there's no distroverpkg package installed under $LIVE to query for $releasever.
Should the user install centos-release RPM with prefix equal to $LIVE beforehand? Or is there any other easy but correct way to pass this variable to yum?
I got around this by editing my yum repo files to replace $releasever with 4. Which is horrible, so I too would like to know if there's a better way.
I still can't get it to work, though. I do get about 90MB of stuff installed, as promised, but there are lots of '%post(...) scriptlet failed' messages during the installation. Although many things are installed into the chroot area there are clearly some things missing. The first command I typed in the chroot was 'ls', but /bin/ls isn't there even though, according to yum.log, coreutils was installed.
Actually, I was able to scroll back far enough to see this during the installation:
error: %pre(coreutils-5.2.1-31.2.i386) scriptlet failed, exit status 255 error: install: %pre scriptlet failed (2), skipping coreutils-5.2.1-31.2
Ron
If you can install centos-release into the chroot, it should then return 4.
Or editing the yum repo file and addding 4 is OK.
On 8/12/06, Johnny Hughes mailing-lists@hughesjr.com wrote:
On Fri, 2006-08-11 at 15:49 +0100, Ron Yorston wrote:
"Eduardo Grosclaude" eduardo.grosclaude@gmail.com wrote:
Great! I was just looking for this! Unfortunately there seems to be something missing: by the time we run the first yum command, there's no distroverpkg package installed under $LIVE to query for $releasever.
Should the user install centos-release RPM with prefix equal to $LIVE beforehand? Or is there any other easy but correct way to pass this variable to
yum?
I got around this by editing my yum repo files to replace $releasever with 4. Which is horrible, so I too would like to know if there's a better way.
I still can't get it to work, though. I do get about 90MB of stuff installed, as promised, but there are lots of '%post(...) scriptlet failed' messages during the installation. Although many things are installed into the chroot area there are clearly some things missing. The first command I typed in the chroot was 'ls', but /bin/ls isn't there even though, according to yum.log, coreutils was installed.
Actually, I was able to scroll back far enough to see this during the installation:
error: %pre(coreutils-5.2.1-31.2.i386) scriptlet failed, exit status 255 error: install: %pre scriptlet failed (2), skipping
coreutils-5.2.1-31.2
Ron
If you can install centos-release into the chroot, it should then return 4.
Or editing the yum repo file and addding 4 is OK.
I downloaded the latest centos-release rpm and tried to install it into $LIVE with rpm relocate feature. This has to be done with --force as rpm thinks it is already installed. Despite the rpm being "no relocatable" as per "rpm -qpi", this works, populating $LIVE/etc and friends. However, after this, yum keeps giving the same error as before.
Brutally replacing $releasever by "4" in CentOS-Base.repo seems to convince yum to work. But then doing "yum -c $LIVE/etc/yum.conf --installroot=$LIVE install centos-release" proceeds to _install_ the same package that rpm had previously _installed_... hmmmm... :P
On Sat, 2006-08-12 at 07:51 -0300, Eduardo Grosclaude wrote:
On 8/12/06, Johnny Hughes mailing-lists@hughesjr.com wrote: On Fri, 2006-08-11 at 15:49 +0100, Ron Yorston wrote: > "Eduardo Grosclaude" eduardo.grosclaude@gmail.com wrote: > >Great! I was just looking for this! Unfortunately there seems to be > >something missing: by the time we run the first yum command, there's no > >distroverpkg package installed under $LIVE to query for $releasever. > >--------------- > >Should the user install centos-release RPM with prefix equal to $LIVE > >beforehand? > >Or is there any other easy but correct way to pass this variable to yum? > > I got around this by editing my yum repo files to replace $releasever > with 4. Which is horrible, so I too would like to know if there's a > better way. > > I still can't get it to work, though. I do get about 90MB of stuff > installed, as promised, but there are lots of '%post(...) scriptlet > failed' messages during the installation. Although many things are > installed into the chroot area there are clearly some things missing. > The first command I typed in the chroot was 'ls', but /bin/ls isn't > there even though, according to yum.log, coreutils was installed. > > Actually, I was able to scroll back far enough to see this during the > installation: > > error: %pre(coreutils-5.2.1-31.2.i386) scriptlet failed, exit status 255 > error: install: %pre scriptlet failed (2), skipping coreutils-5.2.1-31.2 > > Ron
If you can install centos-release into the chroot, it should then return 4. Or editing the yum repo file and addding 4 is OK.
I downloaded the latest centos-release rpm and tried to install it into $LIVE with rpm relocate feature. This has to be done with --force as rpm thinks it is already installed. Despite the rpm being "no relocatable" as per "rpm -qpi", this works, populating $LIVE/etc and friends. However, after this, yum keeps giving the same error as before.
Brutally replacing $releasever by "4" in CentOS-Base.repo seems to convince yum to work. But then doing "yum -c $LIVE/etc/yum.conf --installroot=$LIVE install centos-release" proceeds to _install_ the same package that rpm had previously _installed_... hmmmm... :P
--
when using RPM to install centos-release initially ... use the --root function like this:
rpm -ivh --root $LIVE centos-release
That SHOULD work.
I haven't studied John's scripts .. but also important is properly mounting /dev, /proc, /sys into the chroot as well.
On Sat, 2006-08-12 at 06:21 -0500, Johnny Hughes wrote:
On Sat, 2006-08-12 at 07:51 -0300, Eduardo Grosclaude wrote:
On 8/12/06, Johnny Hughes mailing-lists@hughesjr.com wrote: On Fri, 2006-08-11 at 15:49 +0100, Ron Yorston wrote: > "Eduardo Grosclaude" eduardo.grosclaude@gmail.com wrote: > >Great! I was just looking for this! Unfortunately there seems to be > >something missing: by the time we run the first yum command, there's no > >distroverpkg package installed under $LIVE to query for $releasever. > >--------------- > >Should the user install centos-release RPM with prefix equal to $LIVE > >beforehand? > >Or is there any other easy but correct way to pass this variable to yum? > > I got around this by editing my yum repo files to replace $releasever > with 4. Which is horrible, so I too would like to know if there's a > better way. > > I still can't get it to work, though. I do get about 90MB of stuff > installed, as promised, but there are lots of '%post(...) scriptlet > failed' messages during the installation. Although many things are > installed into the chroot area there are clearly some things missing. > The first command I typed in the chroot was 'ls', but /bin/ls isn't > there even though, according to yum.log, coreutils was installed. > > Actually, I was able to scroll back far enough to see this during the > installation: > > error: %pre(coreutils-5.2.1-31.2.i386) scriptlet failed, exit status 255 > error: install: %pre scriptlet failed (2), skipping coreutils-5.2.1-31.2 > > Ron
If you can install centos-release into the chroot, it should then return 4. Or editing the yum repo file and addding 4 is OK.
I downloaded the latest centos-release rpm and tried to install it into $LIVE with rpm relocate feature. This has to be done with --force as rpm thinks it is already installed. Despite the rpm being "no relocatable" as per "rpm -qpi", this works, populating $LIVE/etc and friends. However, after this, yum keeps giving the same error as before.
Brutally replacing $releasever by "4" in CentOS-Base.repo seems to convince yum to work. But then doing "yum -c $LIVE/etc/yum.conf --installroot=$LIVE install centos-release" proceeds to _install_ the same package that rpm had previously _installed_... hmmmm... :P
--
when using RPM to install centos-release initially ... use the --root function like this:
rpm -ivh --root $LIVE centos-release
^^^^^^^ - here would go the rest of the rest of the rpm name :)
That SHOULD work.
I haven't studied John's scripts .. but also important is properly mounting /dev, /proc, /sys into the chroot as well.
Ron Yorston wrote:
"Eduardo Grosclaude" eduardo.grosclaude@gmail.com wrote:
Great! I was just looking for this! Unfortunately there seems to be something missing: by the time we run the first yum command, there's no distroverpkg package installed under $LIVE to query for $releasever.
Should the user install centos-release RPM with prefix equal to $LIVE beforehand? Or is there any other easy but correct way to pass this variable to yum?
My yum config does not use $releasever which is probably why mine works. A simple sed should be able to trick it up in your yum config, or copy the release file into the chroot before running yum, that is probably best. I'll try that out and update the docs.
I got around this by editing my yum repo files to replace $releasever with 4. Which is horrible, so I too would like to know if there's a better way.
...
Actually, I was able to scroll back far enough to see this during the installation:
error: %pre(coreutils-5.2.1-31.2.i386) scriptlet failed, exit status 255 error: install: %pre scriptlet failed (2), skipping coreutils-5.2.1-31.2
You should not get any errors at this stage. You must mount /dev /proc and /sys or your install will fail.
John.
Ron _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
John Newbigin jnewbigin@ict.swin.edu.au wrote:
Ron Yorston wrote:
"Eduardo Grosclaude" eduardo.grosclaude@gmail.com wrote:
Great! I was just looking for this! Unfortunately there seems to be something missing: by the time we run the first yum command, there's no distroverpkg package installed under $LIVE to query for $releasever.
Should the user install centos-release RPM with prefix equal to $LIVE beforehand? Or is there any other easy but correct way to pass this variable to yum?
My yum config does not use $releasever which is probably why mine works. A simple sed should be able to trick it up in your yum config, or copy the release file into the chroot before running yum, that is probably best. I'll try that out and update the docs.
Or fetch the centos-release RPM and run:
rpm -ivh --nodeps --root $LIVE centos-release-4-3.2.i386.rpm
I got around this by editing my yum repo files to replace $releasever with 4. Which is horrible, so I too would like to know if there's a better way.
..
Actually, I was able to scroll back far enough to see this during the installation:
error: %pre(coreutils-5.2.1-31.2.i386) scriptlet failed, exit status 255 error: install: %pre scriptlet failed (2), skipping coreutils-5.2.1-31.2
You should not get any errors at this stage. You must mount /dev /proc and /sys or your install will fail.
Well, I do get errors. I've tried this several times on three machines, including one that was freshly installed with CentOS 4.3 for just this purpose. Every time I get error in %pre and %post, and the resulting installation is incomplete.
See attachment.
Ron
According to Johnny:
when using RPM to install centos-release initially ... use the --root function like this:
rpm -ivh --root $LIVE centos-release
This trick, immediately followed by the "yum -c $LIVE/etc/yum.conf --installroot=$LIVE install yum" stanza, seems to work for me on an up-to-date Centos 4.3 system. I am still in the process of yumming the rest of the system in... Thank you lots everyone
On Tue, 2006-08-15 at 14:10 +0100, Ron Yorston wrote:
John Newbigin jnewbigin@ict.swin.edu.au wrote:
Ron Yorston wrote:
"Eduardo Grosclaude" eduardo.grosclaude@gmail.com wrote:
Great! I was just looking for this! Unfortunately there seems to be something missing: by the time we run the first yum command, there's no distroverpkg package installed under $LIVE to query for $releasever.
Should the user install centos-release RPM with prefix equal to $LIVE beforehand? Or is there any other easy but correct way to pass this variable to yum?
My yum config does not use $releasever which is probably why mine works. A simple sed should be able to trick it up in your yum config, or copy the release file into the chroot before running yum, that is probably best. I'll try that out and update the docs.
Or fetch the centos-release RPM and run:
rpm -ivh --nodeps --root $LIVE centos-release-4-3.2.i386.rpm
I got around this by editing my yum repo files to replace $releasever with 4. Which is horrible, so I too would like to know if there's a better way.
..
Actually, I was able to scroll back far enough to see this during the installation:
error: %pre(coreutils-5.2.1-31.2.i386) scriptlet failed, exit status 255 error: install: %pre scriptlet failed (2), skipping coreutils-5.2.1-31.2
You should not get any errors at this stage. You must mount /dev /proc and /sys or your install will fail.
Well, I do get errors. I've tried this several times on three machines, including one that was freshly installed with CentOS 4.3 for just this purpose. Every time I get error in %pre and %post, and the resulting installation is incomplete.
See attachment.
Ron
SELINUX= has to be disabled in /etc/sysconfig/selinux ... set to enabled or permissive causes problems in chroots.
Johnny Hughes mailing-lists@hughesjr.com wrote:
SELINUX= has to be disabled in /etc/sysconfig/selinux ... set to enabled or permissive causes problems in chroots.
OK, that got rid of the errors during 'yum install'. I can now run 'ls' in the chroot environment!
Ron