auto-biarch (x86_64 + i686) LiveDVD patch + ISO
by Jan Kratochvil
Hi,
finally created a LiveDVD ISO automatically booting x86_64 OS on x86_64
(and i686 otherwise). Regular users will not notice there exists any new arch
while they will benefit from the full performance of their PC:
http://people.redhat.com/jkratoch/x86bilive-2009062000.tar.gz (71KB)
It uses live_dir=LiveOS-x86_64 vs. live_dir=LiveOS-i686 to boot the image.
The syslinux patch provides "default-{x86_64,i386}" keywords in isolinux.cfg.
livecd-iso-to-disk is not patched/compatible with such image.
livecd-creator should create such ISO on a single run, not by merging the
output of two livecd-creator runs by a 3rd party app.
Regards,
Jan
Reasons:
* I still did not understand why I have to carry with me two media - both
x86_64 and i386 - when all the data perfectly fit on a single media.
* Why I have to try to boot x86_64 first to find out if the specific machine
is x86_64? Even common programmers do not know it, "Windows XP works here".
* The OS must "just work", it must be fun and easy. Requiring a special
technical decision before even starting the OS download is a showstopper.
* Checked that a regular user will on http://fedoraproject.org/get-fedora
still download terrible performance degradation of 32-bit OS although her
hadware is in 70%-95%(?) of cases x86_64. x86_64 is here for 6 years now.
* Arguing x86 may be faster than x86_64... I did not find any such case,
x86_64 is a more modern arch (more registers, PIC for free, better ABI).
We already hit the 2GB address space limitations. x86_64 is the future.
* All the friends of mine have 8Mbit+ ADSL and TB disks downloading many DVD
disks so some several more hundreds of MB are not something to notice.
mkisofs -f -J -r -hide-rr-moved -hide-joliet-trans-tbl -V Fedora-11-x86bi-Live -o ../x86bilive.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-info-table -boot-load-size 4 .
mount -r -o loop Fedora-11-x86_64-Live.iso x86_64/
mount -r -o loop Fedora-11-i686-Live.iso i686/
x86bilive:
total 4
lrwxrwxrwx 1 root root 13 2009-06-18 21:10 GPL -> ../x86_64/GPL
lrwxrwxrwx 1 root root 14 2009-06-18 21:11 LiveOS-i686 -> ../i686/LiveOS/
lrwxrwxrwx 1 root root 16 2009-06-18 21:10 LiveOS-x86_64 -> ../x86_64/LiveOS/
lrwxrwxrwx 1 root root 16 2009-06-18 21:10 README -> ../x86_64/README
drwxr-xr-x 2 root root 4096 2009-06-20 21:44 isolinux/
x86bilive/isolinux:
total 184
lrwxrwxrwx 1 root root 30 2009-06-18 21:13 boot.cat -> ../../x86_64/isolinux/boot.cat
lrwxrwxrwx 1 root root 31 2009-06-18 21:17 ii686 -> ../../i686/isolinux/initrd0.img
-rw-r--r-- 1 root root 14336 2009-06-20 21:45 isolinux.bin
-r--r--r-- 1 root root 1411 2009-06-20 21:44 isolinux.cfg
lrwxrwxrwx 1 root root 33 2009-06-18 21:13 ix8664 -> ../../x86_64/isolinux/initrd0.img
lrwxrwxrwx 1 root root 28 2009-06-18 21:17 ki686 -> ../../i686/isolinux/vmlinuz0
lrwxrwxrwx 1 root root 30 2009-06-18 21:13 kx8664 -> ../../x86_64/isolinux/vmlinuz0
lrwxrwxrwx 1 root root 29 2009-06-18 21:13 memtest -> ../../x86_64/isolinux/memtest
lrwxrwxrwx 1 root root 32 2009-06-18 21:13 splash.jpg -> ../../x86_64/isolinux/splash.jpg
-r--r--r-- 1 root root 159888 2009-06-20 20:48 vesamenu.c32
isolinux.cfg:
default vesamenu.c32
timeout 100
menu background splash.jpg
menu title Welcome to Fedora-11-x86bi-Live!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu color cmdline 0 #ffffffff #00000000
menu hidden
menu hiddenrow 5
label linux0
menu label x86_64 Boot
kernel kx8664
append initrd=ix8664 root=CDLABEL=Fedora-11-x86bi-Live rootfstype=auto live_dir=LiveOS-x86_64 ro liveimg quiet rhgb
menu default-x86_64
label check0
menu label x86_64 Verify and Boot
kernel kx8664
append initrd=ix8664 root=CDLABEL=Fedora-11-x86bi-Live rootfstype=auto live_dir=LiveOS-x86_64 ro liveimg quiet rhgb check
label linux1
menu label i686 Boot
kernel ki686
append initrd=ii686 root=CDLABEL=Fedora-11-x86bi-Live rootfstype=auto live_dir=LiveOS-i686 ro liveimg quiet rhgb
menu default-i386
label check1
menu label i686 Verify and Boot
kernel ki686
append initrd=ii686 root=CDLABEL=Fedora-11-x86bi-Live rootfstype=auto live_dir=LiveOS-i686 ro liveimg quiet rhgb check
label memtest
menu label Memory Test
kernel memtest
label local
menu label Boot from local drive
localboot 0xffff
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ defaults.patch 20 Jun 2009 20:10:46 -0000
@@ -0,0 +1,175 @@
+--- syslinux-3.75-orig/com32/menu/Makefile 2009-04-16 06:42:14.000000000 +0200
++++ syslinux-3.75-defaults/com32/menu/Makefile 2009-06-20 19:21:32.000000000 +0200
+@@ -24,7 +24,7 @@ MODULES = menu.c32 vesamenu.c32
+ TESTFILES =
+
+ COMMONOBJS = menumain.o readconfig.o passwd.o drain.o printmsg.o colors.o \
+- background.o refstr.o execute.o
++ background.o refstr.o execute.o verify_cpu.o
+
+ all: $(MODULES) $(TESTFILES)
+
+--- syslinux-3.75-orig/com32/menu/menu.h 2009-04-16 06:42:14.000000000 +0200
++++ syslinux-3.75-defaults/com32/menu/menu.h 2009-06-20 19:21:32.000000000 +0200
+@@ -224,4 +224,9 @@ void execute(const char *cmdline, enum k
+ /* drain.c */
+ void drain_keyboard(void);
+
++/* verify_cpu.S */
++#if defined(__i386__) || defined(__x86_64__)
++int verify_cpu(void);
++#endif
++
+ #endif /* MENU_H */
+--- syslinux-3.75-orig/com32/menu/readconfig.c 2009-04-16 06:42:14.000000000 +0200
++++ syslinux-3.75-defaults/com32/menu/readconfig.c 2009-06-20 20:23:24.000000000 +0200
+@@ -656,11 +656,22 @@ static void parse_config_file(FILE *f)
+ m->parent_entry->displayname = refstr_get(m->title);
+ }
+ }
+- } else if ( looking_at(p, "default") ) {
+- if (ld.label) {
+- ld.menudefault = 1;
+- } else if (m->parent_entry) {
+- m->parent->defentry = m->parent_entry->entry;
++ } else if ( looking_at(p, "default")
++#if defined(__i386__) || defined(__x86_64__)
++ || looking_at(p, "default-i386")
++ || looking_at(p, "default-x86_64")
++#endif
++ ) {
++#if defined(__i386__) || defined(__x86_64__)
++ if (! ( ( looking_at(p, "default-i386") && verify_cpu () == 0 ) ||
++ ( looking_at(p, "default-x86_64") && verify_cpu () != 0 ) ) )
++#endif
++ {
++ if (ld.label) {
++ ld.menudefault = 1;
++ } else if (m->parent_entry) {
++ m->parent->defentry = m->parent_entry->entry;
++ }
+ }
+ } else if ( looking_at(p, "hide") ) {
+ ld.menuhide = 1;
+--- syslinux-3.75-orig/com32/menu/verify_cpu.S 1970-01-01 01:00:00.000000000 +0100
++++ syslinux-3.75-defaults/com32/menu/verify_cpu.S 2009-06-20 20:30:27.000000000 +0200
+@@ -0,0 +1,119 @@
++/* https://lists.linux-foundation.org/pipermail/fastboot/2006-November/01188... */
++#if defined(__i386__) || defined(__x86_64__)
++ .globl verify_cpu
++verify_cpu:
++ push %ebx
++ push %esi
++ push %edi
++ push %ebp
++ call Xverify_cpu
++ pop %ebp
++ pop %edi
++ pop %esi
++ pop %ebx
++ ret
++
++/*
++ *
++ * verify_cpu.S
++ *
++ * 14 Nov 2006 Vivek Goyal: Created the file
++ *
++ * This is a common code for verification whether CPU supports
++ * long mode and SSE or not. It is not called directly instead this
++ * file is included at various places and compiled in that context.
++ * Following are the current usage.
++ *
++ * This file is included by both 16bit and 32bit code.
++ *
++ * arch/x86_64/boot/setup.S : Boot cpu verification (16bit)
++ * arch/x86_64/boot/compressed/head.S: Boot cpu verification (32bit)
++ * arch/x86_64/kernel/trampoline.S: secondary processor verfication (16bit)
++ * arch/x86_64/kernel/acpi/wakeup.S:Verfication at resume (16bit)
++ *
++ * verify_cpu, returns the status of cpu check in register %eax.
++ * 0: Success 1: Failure
++ *
++ * The caller needs to check for the error code and take the action
++ * appropriately. Either display a message or halt.
++ */
++
++Xverify_cpu:
++
++ pushfl # Save caller passed flags
++ pushl $0 # Kill any dangerous flags
++ popfl
++
++ /* minimum CPUID flags for x86-64 */
++ /* see http://www.x86-64.org/lists/discuss/msg02971.html */
++#define SSE_MASK ((1<<25)|(1<<26))
++#define REQUIRED_MASK1 ((1<<0)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<8)|\
++ (1<<13)|(1<<15)|(1<<24))
++#define REQUIRED_MASK2 (1<<29)
++ pushfl # standard way to check for cpuid
++ popl %eax
++ movl %eax,%ebx
++ xorl $0x200000,%eax
++ pushl %eax
++ popfl
++ pushfl
++ popl %eax
++ cmpl %eax,%ebx
++ jz verify_cpu_no_longmode # cpu has no cpuid
++
++ movl $0x0,%eax # See if cpuid 1 is implemented
++ cpuid
++ cmpl $0x1,%eax
++ jb verify_cpu_no_longmode # no cpuid 1
++
++ xor %di,%di
++ cmpl $0x68747541,%ebx # AuthenticAMD
++ jnz verify_cpu_noamd
++ cmpl $0x69746e65,%edx
++ jnz verify_cpu_noamd
++ cmpl $0x444d4163,%ecx
++ jnz verify_cpu_noamd
++ mov $1,%di # cpu is from AMD
++
++verify_cpu_noamd:
++ movl $0x1,%eax # Does the cpu have what it takes
++ cpuid
++ andl $REQUIRED_MASK1,%edx
++ xorl $REQUIRED_MASK1,%edx
++ jnz verify_cpu_no_longmode
++
++ movl $0x80000000,%eax # See if extended cpuid is implemented
++ cpuid
++ cmpl $0x80000001,%eax
++ jb verify_cpu_no_longmode # no extended cpuid
++
++ movl $0x80000001,%eax # Does the cpu have what it takes
++ cpuid
++ andl $REQUIRED_MASK2,%edx
++ xorl $REQUIRED_MASK2,%edx
++ jnz verify_cpu_no_longmode
++
++verify_cpu_sse_test:
++ movl $1,%eax
++ cpuid
++ andl $SSE_MASK,%edx
++ cmpl $SSE_MASK,%edx
++ je verify_cpu_sse_ok
++ test %di,%di
++ jz verify_cpu_no_longmode # only try to force SSE on AMD
++ movl $0xc0010015,%ecx # HWCR
++ rdmsr
++ btr $15,%eax # enable SSE
++ wrmsr
++ xor %di,%di # don't loop
++ jmp verify_cpu_sse_test # try again
++
++verify_cpu_no_longmode:
++ popfl # Restore caller passed flags
++ movl $1,%eax
++ ret
++verify_cpu_sse_ok:
++ popfl # Restore caller passed flags
++ xorl %eax, %eax
++ ret
++#endif
--- syslinux.spec 16 Apr 2009 18:11:30 -0000 1.59
+++ syslinux.spec 20 Jun 2009 20:10:46 -0000
@@ -7,6 +7,7 @@ License: GPLv2+
Group: Applications/System
URL: http://syslinux.zytor.com/
Source0: ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{tarball_vers...
+Patch9: defaults.patch
ExclusiveArch: %{ix86} x86_64
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: nasm >= 0.98.38-1, perl, netpbm-progs
@@ -33,12 +34,18 @@ MEMDISK, which loads legacy operating sy
%prep
%setup -q -n syslinux-%{tarball_version}
+%patch9 -p1
%build
CFLAGS="-Werror -Wno-unused -finline-limit=2000"
export CFLAGS
# If you make clean here, we lose the provided syslinux.exe
#make clean
+rm -f com32/menu/vesamenu.c32
+make -C com32/lib libcom32.a
+make -C com32/gpllib libcom32gpl.a
+make -C com32/menu vesamenu.c32
+test -f com32/menu/vesamenu.c32
make installer
make -C sample tidy
12 years, 11 months
livecd-creator creates ISO without /home
by Martin Dengler
Hi,
I'm getting a .ISO without a /home despite the filesystem rpm being
installed, and I'd really appreciate any tips on debugging this or
hints as to how this might happen.
This is with the example .ks and I can get livecd-creator to work on a
number of other machines. If I chroot and install the same filesystem
rpm again (--force of course, since it's already installed), I do get
a /home.
I'm running:
$ setarch i586 sudo livecd-creator --skip-compression --cache=../cache
-t /home/mtd/xo-soas/images -c
/usr/share/doc/livecd-tools-024/livecd-fedora-minimal.ks
on a machine like:
# uname -r
Linux benderxxx 2.6.29.4-167.fc11.x86_64 #1 SMP Wed May 27 17:27:08
EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
and I'm getting a filesystem like:
http://people.sugarlabs.org/~mtd/soas-xo1/livecd.ext3_listing
The output of the livecd-creator command is:
http://people.sugarlabs.org/~mtd/soas-xo1/livecd.buildlog
Any help much appreciated.
Martin
14 years, 2 months
Problem with bootloader options in kickstart file
by harry.devine@faa.gov
I have livecd-tools version 013 installed on a Fedora 8 PC. I'm trying to
modify my kickstart file to blacklist a module on the LiveCD that I am
creating, but it isn't working. I'm adding the following to my kickstart
file:
bootloader --timeout=5 --append="blacklist=iTCO_wdt"
When the CD boots I get the timeout value counting down from 5, and when I
hit Tab to look at the kernel options on the command line, all I have is
"rhgb quiet" as stated in the documentation. As a test, I tried putting
"apci=force" as the kernel parameter and that isn't there either. I can
manually enter "blacklist=iTCO_wdt" on the command line and that works,
but the --append option seems to do nothing at all.
Is this broken in this version? I know some may say "upgrade to F11" or
something like that, but that's not really possible for us at this time.
We're working towards that, but I'd like to be able to blacklist that
module during the LiveCD creation.
Thanks,
Harry
14 years, 4 months
Custom LiveCD
by Diego A. Fons
Hi,
I'm making my own LiveCD using Fedora's tools (livecd-creator) as
explain in the Wiki [1].
My question is if it is possible to install software ready to run in the
LiveCD. I mean, you boot the LiveCD and you are able to run the software
without installing it.
The software is not a RPM, it's a software I've made.
Is it possible? and How can I add this software to the LiveCD image?
Best regards,
Diego A. Fons.
[1] http://fedoraproject.org/wiki/How_to_create_and_use_Fedora_LiveCD
14 years, 4 months
Rawhide error
by David Huff
Anyone seen anything like this??
Retrieving
http://download.fedora.devel.redhat.com/pub/fedora/linux/development/x86_...
...OK
/usr/lib/python2.6/site-packages/imgcreate/errors.py:45:
DeprecationWarning: BaseException.message has been deprecated as of
Python 2.6
return unicode(self.message)
Error creating Live CD : Dependency check failed!
[david@RAWHIDE2 ovirt-node-image]$ rpm -q livecd-tools
livecd-tools-024-1.fc11.x86_64
[david@RAWHIDE2 ovirt-node-image]$ cat /etc/redhat-release
Fedora release 11.90 (Rawhide)
-D
14 years, 4 months
Increasing Root Size on Fedora 11 Live USB Stick
by tobby luccas
Hello!
I am new to using Fedora 11 Live on a usb stick and am wondering if there is a relatively simple way to increase the size of the root partition on the stick after it has been installed using the Fedora-Live_USB Creator utility v3.6.7. I used the x86-64 live image to create the stick.
Or alternately recreate the stick, but with more space going to the root partition.
Also, is there a document somewhere, or a thread, which provides an overview of the file system created on the usb stick and also how persistence works? I set the 8 GB stick up with 4 GB of persistence, but this seems to mostly have ended up in the /tmp directory and when I try ro install software to its appropriate place on the system, I have quickly run out of space eventhough I haven't installed anywhere near 4GB of software.
I would appreciate any help which someone may be able to offer. Thanks!
Best Regards,
Toby
_________________________________________________________________
Windows Live™ SkyDrive™: Store, access, and share your photos. See how.
http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009
14 years, 4 months
2 commits - imgcreate/errors.py imgcreate/live.py
by Jeremy Katz
imgcreate/errors.py | 2 ++
imgcreate/live.py | 3 +++
2 files changed, 5 insertions(+)
New commits:
commit 2ef4083a8c1adea520dc22bc43ae4ceb65dc85de
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jul 20 21:26:23 2009 -0400
Make live image a hybrid
Use isohybrid if available so that images can be dd'd to a usb
stick. Note that there's still some initrd changes required for
this to be fully functional
diff --git a/imgcreate/live.py b/imgcreate/live.py
index a4914e0..b98f7b3 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -248,6 +248,9 @@ class LiveImageCreatorBase(LoopImageCreator):
if subprocess.call(args) != 0:
raise CreatorError("ISO creation failed!")
+ if os.path.exists("/usr/bin/isohybrid"):
+ subprocess.call(["/usr/bin/isohybrid", iso])
+
self.__implant_md5sum(iso)
def __implant_md5sum(self, iso):
commit 733f9ce7b96ed492e4b974b089fa647db569e957
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Thu Jul 9 13:44:12 2009 -0400
Include new error definition which I apparently didn't commit
diff --git a/imgcreate/errors.py b/imgcreate/errors.py
index a29b841..800dc3b 100644
--- a/imgcreate/errors.py
+++ b/imgcreate/errors.py
@@ -52,3 +52,5 @@ class SnapshotError(CreatorError):
pass
class SquashfsError(CreatorError):
pass
+class ResizeError(CreatorError):
+ pass
14 years, 4 months
Fedora live usb:- storing data on the remaining space on the USB
by kala
Dear friends.
Last time when i have used fedora 9 on a live usb it gives me an ability to
mount the same usb (which i used for booting) and store data onto it ,
however i skipped FC10 and now when i am using FC11 I am unable to do so any
more, is there a way to use the same usb drive for storing data ( this
enables to share data from systems to systems and OS to OS).
kala bharath
14 years, 4 months
Booting Fedora 11 live CD over HTTP
by Pravin
Hi,
I am working on booting Fedora 11 live CD (Fedora-11-i686-Live.iso)
over HTTP with use of httpfs.
The reason behind choosing httpfs is that, it will work if you have web access.
and Entire ISO file is not downloaded at one go. Only the parts which
are needed
are downloaded, which puts less pressure on memory.
This is done with partial success. Fedora 11 works in Single user
mode without any problems, but it gives ext4-fs related errors on switching
to run level 3 or 5.
Following is the method followed.
-- Added the httpfs, fusermount and kernel modules (to support networking
fuse) to initramfs.
-- Added a new script called "bin/mount_http_iso.sh" which does following
--- Enable networking (by inserting kernel modules).
Currently, modules for only few network cards are added but new card
can be easily added.
--- Setup networking (kernel parameter "ip" is used).
--- Get the location of ISO (kernel parameter "httpfs" is used).
--- Mount the ISO as file (using "httpfs" command and fusermount).
--- Mount the ISO file as iso9660 filesystem using loopback option.
-- Modified the "sbin/real-init" script to call "mount_http_iso.sh" when
httpfs boot parameter is present.
"/bin/plymouthd" had to be disabled as it was somehow freezing
the boot process. I am not sure of reasons behind it, but fedora 11 boots
over http if following line in "init" script is commented out and it does not
boot when this line is there.
{{{
#daemonize --ignore-missing /bin/plymouthd
}}}
If run level is switched for from single user mode run level 3 by executing
"init 3" from single user mode, following ext4-fs related errors are thrown.
Any hints on cause of these errors will be helpful.
Starting Bluetooth services: [ OK ]
EXT-4-fs error (device dm-0): ext4_find_entry: reading #13191 offset 0
/etc/rc.d/rc : line 100 : /etc/rc3.d/S80sendmail: Input/output error
EXT4-fs error (device dm-0): __ext4_get_inode_loc: unable to read
inode block - inode=9642, block=827
After disabling following startup scripts in runlevel 3, Fedora does reaches
multiuser login prompt but enter key is shown on console as "^M" hence login
can-not be done :-(
the modified real-init script is available at
http://rom.etherboot.org/share/pravin/BKO/pxeknife/red_hat/fedora_11_live...
The entire setup for testing the process of booting Fedora 11 is available at
http://rom.etherboot.org/share/pravin/BKO/pxeknife/red_hat/
gpxe image to automatically for automatic booting over fedora 11 can
be downloaded at
http://rom.etherboot.org/share/pravin/BKO/
You can also refer to the following page which contains detailed
documentation of
the problems faced and solutions tried.
My apologies if you find this page little dis-organized. It was created for
personal reference.
http://etherboot.org/wiki/soc/2009/pravin/journal/fedora11bko
Any feedback/criticism/help and hints on getting fedora boot over HTTP
will be welcome :-)
I hope that this work will be found useful.
--
Pravin
http://rom.etherboot.org/share/pravin/BKO/
14 years, 4 months