|
14 years ago 10 |
Basically, all we do here is to
bcmwl-kernel-source
package (so that the wireless chipset used by the HP Mini 2140 can be used right from our new Live CD) and
During the 'Do your stuff' step you can install all the packages you'd like to use right away or purge packages you aren't likely to use anyway (I used nano
as an example).
This guide was tested with the LinuxMint-8-RC1.iso
but should work with any .iso / cdrom out there, just alter the bold parts.
Let's start!
Create working directories.
mkdir mint{,/cdrom,/tmp,/root}
Mount the CD, or ISO or whatever (replace '../Downloads/LinuxMint-8-RC1.iso
' accordingly) and copy the files to mint/image/
...
sudo su
mount -o loop,ro ../Downloads/LinuxMint-8-RC1.iso mint/cdrom
cp -r mint/cdrom/ mint/image/
cd mint/
Move the filesystem.squashfs, mount it and rsync the rootfs to the remaster folder.
mv image/casper/filesystem.squashfs tmp/
mount -o loop tmp/filesystem.squashfs root/
rsync -a root/ remaster/
cp /etc/resolv.conf remaster/etc/
chroot magic ;)
MOUNTS='proc sys dev'
for i in $MOUNTS; do mount -o bind /${i} remaster/${i}; done
chroot remaster /bin/bash
mount -t devpts none /dev/pts
Do your stuff.
Install and build the broadcom driver (and lvm tools for anyone who installed Mint on an encrypted lvm on a netbook ...)
apt-get update
apt-get upgrade
apt-get install bcmwl-kernel-source lvm2
apt-get purge nano
Cleanup
apt-get clean
rm -rf /tmp/*
rm /etc/resolv.conf
umount /dev/pts
exit
Detach mountpoints
for i in $MOUNTS; do umount remaster/${i}; done
Rebuild rootfs squash image.
mksquashfs remaster image/casper/filesystem.squashfs -e remaster/boot
Copy the new initramfs to your new image.
cp remaster/boot/initrd.img-2.6.31-14-generic image/casper/initrd.gz
Update the manifest files ...
chroot remaster dpkg-query -W --showformat='${Package} ${Version}\n' |tee image/casper/filesystem.manifest
cp -v image/casper/filesystem.manifest{,-desktop}
REMOVE='ubiquity casper live-initramfs user-setup discover xresprobe os-prober libdebian-installer4'
for i in $REMOVE; do sed -i "/${i}/d" image/casper/filesystem.manifest-desktop; done
... and update the md5sum file.
cd image && find . -type f ! -name 'md5sum.txt' -print0 |xargs -0 md5sum > md5sum.txt
Done! Build the new image ...
mkisofs -r -V "Mint8-Remix" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../Mint8-HPMini-Remix.iso .
... and unmout cdrom and rootfs.
cd ..
umount cdrom/
umount root/
exit
Finally burn the new .iso file to CD / DVD or use it to create a bootable USB stick.
Could we have an updated tutorial for this? I tried doing this with Maya and it broke.
Highly informative and accurate Mini-HOWTO, Tutorial or post.
It worked fine for LinuxMint 9 XFCE also, but I had to tweak around a few more things after 'apt-get update; apt-get-upgrade'
1) edit remaster/etc/casper.conf; change USERNAME and HOSTNAME to "mint"
2) zcat remaster/boot/initrd.img-2.6.32-21-generic |lzma -9 >image/casper/initrd.lz
3) cp -p image/casper/initrd.lz remaster/boot/initrd.img-2.6.32-21-generic
I think, the last 2 steps will save more disk/squashfs space.