Remastered Mint CD/DVD

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Remastered Mint CD/DVD

Postby oobetimer on Wed Jul 11, 2012 11:31 am

1. Install the next packages (if not installed)
sudo apt-get install squashfs-tools genisoimage

2. Make a folder livecdtmp
mkdir ~/livecdtmp

3. Go to the folder
cd ~/livecdtmp

4. Make folders extract-cd and mnt
mkdir extract-cd mnt

5. Mount linuxmint-13-mate-dvd-32bit.iso (Download first of course)
sudo mount -o loop ~/linuxmint-13-mate-dvd-32bit.iso mnt

6. Move the image to the folder extract-cd
sudo rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd

7. Extract squashfs and move extracted to folder edit
sudo unsquashfs mnt/casper/filesystem.squashfs
sudo mv squashfs-root edit


8. Copy resolv.conf and mount /dev to the chroot-system. If there is no resolv.conf, make it first
nm-tool # Tells the DNS
sudo nano /etc/resolv.conf


nameserver here_your_primary_DNS
nameserver here_your_secondary_DNS


sudo cp /etc/resolv.conf edit/etc/
sudo mount --bind /dev/ edit/dev


9. Chroot to the system
sudo chroot edit

10. Mount and export things
mount -t proc none /proc && mount -t sysfs none /sys && mount -t devpts none /dev/pts

export HOME=/root && export LC_ALL=C


11. Update package cache
apt-get update

12. Query installed packages by size
dpkg-query -W --showformat='${Installed-Size}\t${Package}\n' | sort -nr | less

q gets you out from query

13. Edit the system (install/remove packages, etc.). When removing packages, use purge so that packages settings are disappearing also. An example:
apt-get purge ubiquity-slideshow-mint apt-xapian-index
apt-get install gnome-ppp


14. Clean the system and exit from chroot
apt-get clean
rm -rf /tmp/* ~/.bash_history
rm /etc/resolv.conf
umount /proc
umount /sys
umount /dev/pts
exit


15. Umount edit/dev
sudo umount edit/dev

16. Umount linuxmint-13-mate-dvd-32bit.iso
sudo umount mnt

17. Make ISO
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs

sudo printf $(sudo du -sx --block-size=1 edit | cut -f1) > extract-cd/casper/filesystem.size


- Rename distro
sudo nano extract-cd/README.diskdefines

- Remove old md5sum and make new
cd extract-cd
sudo rm md5sum.txt
find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt


- Build ISO
cd ..

sudo mkisofs -r -V “$IMAGE_NAME” -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../your_own_distro.iso extract-cd


18. Change permissions
cd
sudo chmod 777 your_own_distro.iso


19. Test the new distro using VirtualBox, Qemu, etc
Attachments
make iso.png
make iso.png (79.99 KiB) Viewed 3698 times
Testing the distro.png
Testing the distro.png (237.26 KiB) Viewed 3698 times
User avatar
oobetimer
Level 7
Level 7
 
Posts: 1889
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Linux Mint is funded by ads and donations.
 

Re: Remastered Mint CD/DVD

Postby Webtest on Sun Sep 08, 2013 12:39 pm

Thank you oobetimer for the most interesting HowTo post.

I've been using Mint LiveMedia for nearly 4 years and have complained a lot about the various nuisances running these systems. I have been thinking about remastering my own version for quite awhile, but am just getting around to it. I was shown the link to this thread and decided to give it a try. However, the ISO file I created and burned via USB Image Writer was not successful in generating a bootable USB drive. I have never had any significant trouble burning bootable LiveMedia for any of the downloaded Linux Mint distro ISOs.

Here is my system: Linux Mint 15 32-bit Mate LiveDVD on a locked SD card, with an external USB hard drive. I already had a copy of the exact ISO file you used for your demo on a data DVD.

Here is what happened: I understood most of the commands and proceeded without difficulty up to step 7:
7. Extract squashfs and move extracted to folder edit
sudo unsquashfs mnt/casper/filesystem.squashfs
>There was one comment during the unsquash: create_inode: socket squashfs-root/run/samba/unexpected ignored
Is this a problem?

I just wanted to try remastering a system, so I did not change any packages and skipped step 13.

I proceeded through the steps up to step 17
17. Make ISO
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs
sudo printf $(sudo du -sx --block-size=1 edit | cut -f1) > extract-cd/casper/filesystem.size
>Got this message: bash: extract-cd/casper/filesystem.size: Permission denied ??? Is this a problem?

I just kept going and I did get an ISO file which I burned onto a USB thumb drive with USB Image Writer. Nice try, but when I try to boot it I just get a BIOS message:
Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key


I would sincerely appreciate any and all comments, suggestions, and assistance in getting this to run.

Blessings in abundance, all the best, & ENJOY!
Art in Carlisle PA, USA
HP dx2400 Core 2 Duo 4 GB - Mint 8 Helena Gnome <LinuxMint-8.iso 27-Nov-2009 19:11 688M on LOCKED Kanguru USB drives and SD flash cards> - Also Mint 10 Julia Gnome LiveDVD, Mint 13 Maya Mate 32-bit LiveUSB, Mint 15 Olivia Mate 32-bit LiveUSB
Webtest
Level 3
Level 3
 
Posts: 167
Joined: Sun Feb 21, 2010 4:45 pm
Location: Carlisle, Pennsylvania, USA

Re: Remastered Mint CD/DVD

Postby skinnyMan on Mon Oct 07, 2013 9:03 am

I will give your system a try, I followed this guide http://ubuntuforums.org/showthread.php?t=688872 but the final ISO always comes out to be about 800MB which is way to big for what I am trying to do. Thanks.
skinnyMan
Level 1
Level 1
 
Posts: 3
Joined: Tue Aug 20, 2013 3:40 pm

Re: Remastered Mint CD/DVD

Postby administrollaattori on Tue Oct 08, 2013 10:47 am

skinnyMan wrote:but the final ISO always comes out to be about 800MB which is way to big for what I am trying to do. Thanks.

668Mt -> viewtopic.php?f=46&t=145009#p766232
User avatar
administrollaattori
Level 6
Level 6
 
Posts: 1100
Joined: Tue Sep 03, 2013 4:51 am


Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 12 guests