Obre el menú principal


La revisió el 11:13, 31 maig 2013 per Sasogu (discussió | contribucions) (Es crea la pàgina amb «*First, I must take no credit for this how-to. I stumbled upon it here and have reproduced it for easy access. Full credits to the original author*NOTE: Beware of cop...».)
(dif) ← Versió més antiga | Versió actual (dif) | Versió més nova → (dif)
  • First, I must take no credit for this how-to. I stumbled upon it here and have reproduced it for easy access. Full credits to the original author*NOTE: Beware of copying and pasting commands with < > brackets as it completely depends on your individual setup.REMASTERSYS RESOURCES+ IMPORTANT resources & files:Remastersys HomeRemastersys Forum HomeRemastersys WikiCapink's in-depth explanation of Fragadelic's Remastersys scriptOr if you're a scripter, examine /usr/bin/remastersys. I tried adding the -noI -noD -noF switches inside the script so that squashfs would be uncompressed, but the boot and install take nearly 40% longer on machines with only 512MB of ram. That, in addition to wasted disk space and possibly bandwidth, means you should prolly just avoid making that same change.And when you edit /etc/remastersys.conf, DO NOT change the LIVEUSER variable to "user" or "gdm".Add one of these repositories, depending on your distro:# Remastersys Debiandeb http://www.geekconnection.org/remastersys/repository debian/# Remastersys Ubuntu (For Gutsy and Earlier - up to version 2.0.11-1)deb http://www.geekconnection.org/remastersys/repository remastersys/# Remastersys Ubuntu (For Hardy and Newer - version 2.0.12-1 and up)deb http://www.geekconnection.org/remastersys/repository ubuntu/ REMASTERSYS NOTESThe only real difference between backup and dist modes is that backup mode copies the /home directory to the CD/DVD. Dist mode auto-logins to the desktop with the LIVEUSER you create, whereas backup mode stops at GDM, waiting for a specific user on your current machine to login and eventually find their normal desktop on the CD/DVD and the installed system.Either way, the compressed filesystem will need to be 4GB or less. No buts about it, unless of course, you're a genius with ample time on your hands. That also means backup mode will need to include your /home folder in that 4 GB iso.Run aptitude clean to get rid of unnecessary .debs.When you run remastersys dist, you create your dist CDFS, which is eventually converted into your dist ISO. If you only need to edit one file, such as menu.lst so you can change Grub's timeout... just go to the CDFS chroot ( /home/remastersys/ISOTMP/ ) and you'll see the filesystem layout of your dist CD. In this example, edit /home/remastersys/ISOTMP/boot/grub/menu.lst and then you'll be ready to run remastersys dist iso since there's no reason to run the regular dist command and completely re-create the CDFS.If you've already run remastersys, and you need to make drastic changes, make sure to run remastersys clean before remastersys dist.When you're ready to test the .iso out, use a virtual machine like VMware, VirtualBox, or QEMU... so you don't have to waste any CDs or time burning the CDs.And just FAIR WARNING: I would highly consider avoiding Intrepid & Jaunty if you're planning on many, many people using this, particularly machines with Intel-based graphics... as I've found two Intel machines that display a cruddy Xorg immediately after only upgrading default Ubuntu packages (NOT installing anything extra yet)... but I do like most of the software better in Intrepid. Jaunty is definitely still too new right now. Debian Lenny might be best for a larger, supported distro as it is now officially stable.DISTRO PREPUpgrade and install all your packages. Google Desktop might be a possible addition to your dist.Remove all unnecessary packages. Here is a nice guide with an example of what I've chosen to remove from my system:aptitude purge ubuntu-desktop ttf-arabeyes ttf-arphic-uming ttf-indic-fonts-core ttf-kochi-gothic ttf-kochi-mincho ttf-lao ttf-malayalam-fonts ttf-thai-tlwg ttf-unfonts-core language-support-en language-support-translations-en language-support-writing-en myspell-en-za openoffice.org-thesaurus-en-au openoffice.org-l10n-en-za openoffice.org-l10n-en-gb openoffice.org-help-en-gb scim scim-bridge-agent scim-bridge-client-gtk scim-gtk2-immodule scim-modules-socket libscim8c2a libchewing3 brltty brltty-x11 gnome-app-install ubufox apturl tracker tracker-search-tool libdeskbar-tracker libtracker-gtk0 deskbar-applet fast-user-switch-applet tomboyMove all backgrounds to /usr/share/backgrounds/Move all GDM themes to /usr/share/gdm/themes/Move all other themes to /usr/share/themes/Move all icons & cursors to /usr/share/icons/Likewise, move all usplash themes somewhere in /usr/share/, or splashy themes to /etc/splashy/themes/Make your graphical changes (GNOME, KDE, etc.). I use GNOME, and I like to move my volume applet to the top right for easy wheel scrolling of volume. Everybody I know that uses Ubuntu says that's their favorite part about the way I configure it for them. I add the weather applet to the left of the volume applet, and then I add the system monitor applet somewhere on the top panel and enable the memory, networking, swap, & hard disk graphs. I lock the applets and panels. It's best to organize these applets thru the gconf-editor. Then, I right-click the applications menu to edit it and do a little trimming. I use the GNOME Keyboard app to make the CapsLock an extra Ctrl key. I also edit the GNOME "Sessions" and "Services" apps to trim them down to something I find more reasonable (i.e. - no bluetooth, no automatic upgrade manager, & no "user folders update", among other things). Then I use sysv-rc-conf to trim some more. If you want to use Compiz Fusion, it's prolly best to install fusion-icon and switch to metacity right before copying your config files to /etc/skel/. I make sure Nautilus, Firefox [extensions], and other programs are setup the way I like...COPY WORTHY CONFIG FOLDERS TO SYSTEM WIDE FOLDERSDon't copy .xchat/ as it saves your username in the config.Don't copy .wine/ as it is very problematic, try using the global wine folder, which is (??).Clear all Firefox cache and GNOME Recent Documents cache right before doing this.Clearly, you must be a superuser to do this, so don't forget about sudo. Now might be a good time to use sudo's -s switch so you don't need to type sudo before all these commands:sudo -scp -Rf .config/ .fontconfig/ .gconf/ .gconfd/ .gnome2/ .mozilla/ .nautilus/ /etc/skel/cp -Rf .config/ .fontconfig/ .gconf/ .gconfd/ .gnome2/ .mozilla/ .nautilus/ /root/cd /etc/skelchown -R root:root .config/ .fontconfig/ .gconf/ .gconfd/ .gnome2/ .mozilla/ .nautilus/cd /rootchown -R root:root .config/ .fontconfig/ .gconf/ .gconfd/ .gnome2/ .mozilla/ .nautilus/GDMUse GNOME "Login Window" app to select your new theme and login background colors.Remember the HEX values for the color, as you'll need them later.Search for the terms GraphicalTheme & GtkTheme in these two files and you'll see 4 variables you need to change your GDM theme, GtkTheme, and 2 background color for pre- and post-login. Should be near lines 504, 347, & 466.sudo <EDITOR> /etc/gdm/gdm.confsudo <EDITOR> /etc/gdm.conf-customBOOT SPLASHOnly way I know of to customize Usplash is to use the Startup Manager program.Using most Usplash themes was buggy for me on recent versions of Ubuntu.As long as the theme works on your computer, it should work on both the dist cd & dist install.Splashy is an easy alternative to Ubuntu's default Usplash.Splashy allows you to create boot, shutdown, suspend, resume, & error images of your choice with a progress bar. Just make sure to use PNGs otherwise you'll get an Error -3.Simply this command to create splashy themes:splashy -cBOOT LOADERThis is only for the CD, it will not copy to the dist install as ubiquity & update-grub create a custom Grub config for the new system during install.If you want to alter the installed Grub, update-grub must be altered, then the package must be flagged to never upgrade.You could also choose ISOLINUX if GRUB doesn't work on some extremely rare chipsets.EDIT the Grub config files in /etc/remastersys/grub/:sudo <EDITOR> menu.lst.gutsyandbefore -OR- menu.lst.hardyandlaterCREATE Grub background & move to proper folder:convert infile.jpg -resize 640x480 -colors 14 -depth 8 splash.xpm.gzmv splash.xpm.gz /etc/remastersys/grub/If you plan on editing the update-grub script to reflect your changes on the installed system, you can move your splash image to the shared folder:mv splash.xpm.gz /usr/share/grub-installer/splash.xpm.gzPRESEEDINGPreseeding allows you to customize what variables are passed to the Ubiquity installer, but it only works if you use ubiquity's --automatic switch. I don't need to make it automatic for everybody yet, but whenever I install it I can simply press Alt+F2 and type in "ubiquity --automatic" so that my language, time zone, & keyboard layout are automatically passed to the installer. I only use this in my config right now, but there are more options available which can be seen here, in this example guide.Eventually remastersys will copy all preseeds from the /etc/remastersys/preseed/ folder for multiple machines and/or purposes.Until then, just add your own preseed options to /etc/remastersys/preseed/custom.preseed# Locale sets language and country.d-i debian-installer/locale string en_US# Keyboard selection.# Disable automatic (interactive) keymap detection.d-i console-setup/ask_detect boolean false#d-i console-setup/modelcode string pc105d-i console-setup/layoutcode string us# To select a variant of the selected layout (if you leave this out, the# basic form of the layout will be used):#d-i console-setup/variantcode string dvorak# Controls whether or not the hardware clock is set to UTC.d-i clock-setup/utc boolean false# You may set this to any valid setting for $TZ; see the contents of# /usr/share/zoneinfo/ for valid values.d-i time/zone string US/Central# Controls whether to use NTP to set the clock during the installd-i clock-setup/ntp boolean true# NTP server to use. The default is almost always fine here.#d-i clock-setup/ntp-server ntp.example.com STATIC DNS (OpenDNS), EVEN WITH DHCPEDIT resolvconf:sudo -smkdir /etc/resolvconf/resolv.conf/<EDITOR> /etc/resolvconf/resolv.conf/base+ ADD:nameserver EDIT the DHCP client:<EDITOR> /etc/dhcp3/dhclient.conf+ REPLACE the "#prepend domain-name-servers" line with this:prepend domain-name-servers,; RESTRICTED FIRMWARE AND DRIVERSIt's probably a good idea to add restricted hardware drivers or firmware, especially for wireless networking.It's also probably a good idea to let the jockey-gtk "Hardware Drivers" app juggle between the multiple Nvidia and ATI drivers *after* installation. There are older, legacy graphics cards that won't work with the newest drivers from these manufacturers' websites.I only wanted to support all the wireless cards possible and NTFS support for easy resizing of Windows partitions, so I installed these packages:sudo aptitude install b43-fwcutter ndisgtk madwifi linux-restricted-modules ntfs-3g ntfs-configUSB PERSISTENCEIf using 8.10 or later, simply use the usb-creator tool, which is installed by default in Intrepid.If using 8.04 LTS, you can add usb-creator by following these instructions... however, persistence still won't work with the default 8.04 initrd.As long as you can copy and paste, it might be easier to just ignore this program and follow these manual instructions... (NOTE: Everything before the fdisk command must be run before remastersys dist to work properly)---- BEGIN PREPARATION ----sudo -s<EDITOR> /usr/share/initramfs-tools/scripts/casper (for 8.04 and earlier ONLY)+ REMOVE this section: ",mode=755"<EDITOR> /usr/share/initramfs-tools/init (for 8.04 and earlier ONLY)+ ADD the lines preceded by a + between the lines preceded by a *:* break)* break=premount* ;;*+ persistent)+ PERSISTENT=yes+ root_persistence=casper-rw+ home_persistence=home-rw+ ;;+* esac For all versions of Ubuntu, if you'd like to take away the prompt at shutdown to remove the CD from the tray and press ENTER, consider this step [...'cause I'm not positive it's the right solution]:chmod -x /etc/rc[06].d/*casperNow re-run remastersys to implement these new initramfs changes:remastersys clean; remastersys dist---- END PREPARATION ----fdisk /dev/sd<X> (replacing <X> with what you believe, 110% sure, is your flash drive)Now, add 2 to 4 partitions depending on the size of your distro, whether you want a separate partition for your home directory, and whether you want a FAT16/32 partition for easy access on Windows machines. Make sure the first partition is bootable. Now format and label your partitions:mkfs.ext2 -L <distroName> /dev/sd<X>1mkfs.ext2 -L casper-rw /dev/sd<X>2mkfs.ext2 -L home-rw /dev/sd<X>3mkfs.vfat -F 16 -n files /dev/sd<X>4Now pull out the drive & plug it back in.cd /media/cdrom/cp -R boot boot.catalog casper/ .disk/ md5sum.txt preseed/ README.diskdefines /media/<distroName>/cd /boot/grub/cp ./*stage* /media/<distroName>/boot/grub/<EDITOR> /media/<distroName>/boot/grub/menu.lst+ ADD a boot menu along these lines...default 0timeout 7#color cyan/blue white/blue#splashimage=/boot/splash.xpm.gztitle Start Ubuntu in Graphical Modekernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram rw persistentinitrd /casper/initrd.gz#title Install Ubuntu#kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram #only-ubiquity#initrd /casper/initrd.gztitle Start Ubuntu in Demo Modekernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/raminitrd /casper/initrd.gztitle Start Ubuntu in Safe Graphical Modekernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram xforcevesa rw persistentinitrd /casper/initrd.gz#title Start Ubuntu in Text Only Mode#kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram #textonly rw persistent#initrd /casper/initrd.gz#title Check the CD/DVD for defects#kernel /casper/vmlinuz boot=casper integrity-check#initrd /casper/initrd.gztitle Memory Testkernel /boot/memtesttitle Boot the First Hard Diskroot (hd1)chainloader +1 Install grub to the MBR of the flash drive:grub$ grub > geometry (hd <Press TAB key now, making sure to realize which one is your USB>$ grub > root (hd<1>,0)$ grub > setup (hd<1>,0)$ grub > quit