remaster Ubuntu Installer USB drive image

From Noah.org
Revision as of 21:45, 18 November 2014 by Root (Talk | contribs) (Created page with 'Category:Engineering These are currently most notes I have cut and pasted from various websites. I also have some '''Kickstart'''/'''Kickseed''' notes floating around somewh…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


These are currently most notes I have cut and pasted from various websites. I also have some Kickstart/Kickseed notes floating around somewhere that I want to merge with this stuff. This topic comes up often enough that I'd like to make it an effortless task.

Originally from: http://askubuntu.com/questions/28299/dvd-with-both-32-bit-and-64-bit-ubuntu/28492#28492

You can create a DVD that contains both versions of the live CD:

Download ubuntu-13.04-desktop-i386.iso and ubuntu-13.04-desktop-amd64.iso.
Create a folder structure for the DVD:

$ mkdir -p ubuntu-13.04-desktop-i386-amd64/boot/{grub,iso}
$ mv ubuntu-13.04-desktop-{i386,amd64}.iso ubuntu-13.04-desktop-i386-amd64/boot/iso/
Save the following as ubuntu-13.04-desktop-i386-amd64/boot/grub/grub.cfg:

# Derived from /boot/grub/loopback.cfg from ubuntu-13.04-desktop-i386.iso and ubuntu-13.04-desktop-amd64.iso.

menuentry "Try Ubuntu without installing (32-bit)" {
    loopback iso /boot/iso/ubuntu-13.04-desktop-i386.iso
    linux   (iso)/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=/boot/iso/ubuntu-13.04-desktop-i386.iso quiet splash --
    initrd  (iso)/casper/initrd.lz
}
menuentry "Try Ubuntu without installing (64-bit)" {
    set gfxpayload=keep
    loopback iso /boot/iso/ubuntu-13.04-desktop-amd64.iso
    linux   (iso)/casper/vmlinuz.efi  file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=/boot/iso/ubuntu-13.04-desktop-amd64.iso quiet splash --
    initrd  (iso)/casper/initrd.lz
}
menuentry "Install Ubuntu (32-bit)" {
    loopback iso /boot/iso/ubuntu-13.04-desktop-i386.iso
    linux   (iso)/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity iso-scan/filename=/boot/iso/ubuntu-13.04-desktop-i386.iso quiet splash --
    initrd  (iso)/casper/initrd.lz
}
menuentry "Install Ubuntu (64-bit)" {
    loopback iso /boot/iso/ubuntu-13.04-desktop-amd64.iso
    linux   (iso)/casper/vmlinuz.efi  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity iso-scan/filename=/boot/iso/ubuntu-13.04-desktop-amd64.iso quiet splash --
    initrd  (iso)/casper/initrd.lz
}
menuentry "Check disc for defects (32-bit)" {
    loopback iso /boot/iso/ubuntu-13.04-desktop-i386.iso
    linux   (iso)/casper/vmlinuz  boot=casper integrity-check iso-scan/filename=/boot/iso/ubuntu-13.04-desktop-i386.iso quiet splash --
    initrd  (iso)/casper/initrd.lz
}
menuentry "Check disc for defects (64-bit)" {
    loopback iso /boot/iso/ubuntu-13.04-desktop-amd64.iso
    linux   (iso)/casper/vmlinuz.efi  boot=casper integrity-check iso-scan/filename=/boot/iso/ubuntu-13.04-desktop-amd64.iso quiet splash --
    initrd  (iso)/casper/initrd.lz
}
menuentry "Test memory" {
    loopback iso /boot/iso/ubuntu-13.04-desktop-i386.iso
    linux16 (iso)/install/mt86plus
}

Generate an ISO image (You may need to install xorriso.):

    $ grub-mkrescue --output ubuntu-13.04-desktop-i386-amd64.iso ubuntu-13.04-desktop-i386-amd64

You can now burn ubuntu-13.04-desktop-i386-amd64.iso (1.6 GB) to a DVD and choose either 32-bit or 64-bit options at boot.

ubuntu-13.04-desktop-i386-amd64

Note: This worked for me in a virtual machine. I strongly recommend testing it using one DVD before burning multiple copies.

So 28. Apr 01:13:30 CEST 2013
info@thomas-reith.de

Regarding the disappointing decision, that Ubuntu 13.10 and above doesn't
provide non PAE Kernels for the i386 architecture, anymore, I've compiled 
a custom kernel based on the latest offical Ubuntu kernel source package,
with PAE (HIGHMEM) disabled.

The kernel has been tested and compiled on ThinkPad T42, but should run 
on other Intel non PAE systems, too.

regards

webtom

ATTENTION: 3.8.x kernels have NOT been tested on Ubuntu 12.10, 
           upgrade to Ubuntu 13.04 first.

Build Steps:

1.1 apt-get source linux-[current version]-generic
    (example: apt-get source linux-image-3.5.0-19-generic)

    if there are linux-* files from previous builds in your directory, 
    simply remove them or save time doing the following steps:
    tar xvzf linux_3.x.0.orig.tar.gz (which should be there)
    rm -rf linux-3.x.0; mv linux-3.x linux-3.x.0
    gzip -d < linux_[version].diff.gz | patch -p0

1.2 get make-ubuntu-kernel-de.sh from 
    https://code.launchpad.net/make-ubuntu-kernel
    into ~/bin 
   
1.3 comment out
    linux-[version]/debian/control-scripts/preinst
    line 93 - 100
    ...
    #$arch = `uname -i`;
    #if ($arch =~ m/86/) {
    #       system ("grep -q ' pae ' /proc/cpuinfo");
    #       if ($?) {
    #                       print STDERR "This kernel does not support a non-PAE CPU.\n";
    #                       exit 1;
    #       }
    #}
    ...

1.4 chmod -R 755 linux-[version]/debian/scripts
    chmod 755 linux-[version]/debian/rules
   
1.5 change directory into linux-[version]
    call sudo ~/bin/make-ubuntu-kernel-de.sh wt-non-pae
    ...
    kernel menuconfig: Processor type and features 
    High Memory Support = (off)
    PAE (Physical Address Extension) Support = [ ] (false)
    ...
    wait...

1.6 or simply download and install the prebuild packages with
    dpkg -i linux-image-[version]-wt-non-pae_[version]_i386.deb
    dpkg -i linux-headers-[version]_all.deb
    dpkg -i linux-headers-[version]-wt-non-pae_[version]_i386.deb
    from
    http://bazaar.launchpad.net/~webtom/+junk/linux-image-i386-non-pae/files

1.7 reboot and enjoy :-)


2.1  Fresh Ubuntu Installation from stick

2.2  Ubuntu Desktop 12.10: vmlinuz-3.5.0-17-wt-non-pae_3.5.0-17.28_i386 
                           initrd-3.5.0-17-wt-non-pae_3.5.0-17.28_i386.lz
     Ubuntu Desktop 13.02: vmlinuz-3.8.0-19-wt-non-pae_3.8.0-19.29_i386
                           initrd-3.8.0-19-wt-non-pae_3.8.0-19.29_i386.lz

2.3  create an usb stick with "usb-creator-gtk"

2.4  remount the stick

2.5  replace /media/[stick]/casper/vmlinuz with vmlinuz-[version]
     what is it? it's the kernel from linux-image-[version]

2.6  replace /media/[stick]/casper/initrd.lz with initrd-[version]
     what is it? it's the ubuntu initrd.lz enhanced with lib/modules/[version]-wt-non-pae/ 
     (Developer Info: don't forget using option '-H newc' with cpio (it took me hours)

2.7  copy linux-headers-[version].deb to /media/[stick]/

2.8  copy linux-image-[version].deb to /media/[stick]/

2.9  boot from stick and complete the Ubuntu installation

2.10 before the system reboots press ALT+CTRL+F1 to switch to the console
     ATTENTION: This step is important to get the modules installed.
                Without these modules, your system won't boot correctly!

2.11 change directory to /cdrom, wich is your stick 

2.12 run "dpkg --root=/target -i linux-image-[version].deb"
     ignore the warnings, all you need at this time are 
     /target/lib/modules/[version]-wt-non-pae/

2.13 run "dpkg --root=/target -i linux-headers-[version].deb"

2.14 run "dkpg --root=/target -i linux-headers-[version]_all.deb

2.15 reboot 

2.16 install most recent linux-image and linux-headers; there should be no warnings, now

2.16 enjoy :-)