willi_yi wrote:Could I install a new Debian 8 from a flash-disk?
I've installed the Debian Jessie LiveCD version onto the HDD and use grub4dos to boot that. Download a ISO for your particular choice/system from
here In my case I downloaded from the
i386 choice here and selected the
lxde desktop iso as my preferred choice of desktop.
You might burn and boot that to then partition your HDD. All data is lost when you partition the disk so make sure you have backups.
Typically you might partition a small FAT partition to which grub4dos menu.lst is installed (bootloader), say 30MB FAT. Another partition for the boot filesystem, 10GB ext3 perhaps. Yet another for persistence (changes) - maybe 10GB ext3 again (when creating that partition giving it a name (LABEL) of 'persistence'). And a last partition for data/docs (remainder of available disk space).
After partitioning create a directory under in the 'boot' partition (sda2 maybe in the above context) called perhaps DEB-LXDE (LXDE is the ISO desktop version I prefer myself and the choice of ISO I downloaded). Then open the ISO and copy the 'live' folder and its contents from the CD over onto HDD into the boot partitions DEB-LXDE folder. So something like sda2 partition /DEB-LXDE/live will then exist
Edit menu.lst (grub4dos boot file) in the first partition to look something like
# menu.lst
color white/blue black/cyan white/black cyan/black
timeout 10
default 1
title DebianLive686 LXDE READ WRITE PERSISTENCE PARTITION
root (hd0,1)
kernel /DEB-LXDE/live/vmlinuz2 boot=live config persistence quickreboot noprompt showmounts live-media-path=/DEB-LXDE/live/ config
initrd /DEB-LXDE/live/initrd2.img
title LXDE DebianLive686 READ ONLY PERSISTENCE
root (hd0,1)
kernel /DEB-LXDE/live/vmlinuz2 boot=live config persistence persistence-read-only quickreboot noprompt showmounts live-media-path=/DEB-LXDE/live/ config
initrd /DEB-LXDE/live/initrd2.img
Note that the root (hd0,2) part is a disk identification counting from zero, so first disk (0), 2rd partition in that disk (1) is referenced as hd0,1 in grub4dos terms. If it were the second disk, third partition that would be root (hd1,2)
Finally create a file in the root directory of the persistence partition called persistence.conf and edit that file to contain
/ union
making sure to have a new line at the end (press enter after typing / union). Note that there's a space between the slash and the word union).
Boot, and you'll have a grub4dos menu with options of either booting read only, where no system changes are preserved when you shutdown (if you change the desktop wallpaper for example that wont be remembered). But where changes saved into the last partition will be preserved (documents etc.). Or you can boot read/write where system changes are preserved across reboots. Typically I boot read/write to make changes, apply updates etc. and then reboot back into read only mode. That way when you boot read only you boot the exact same system each and every time, so if you screw things up you can just reboot to get back to how it was before. But if you want to make changes (or apply updates such as running
apt-get update
apt-get upgrade
from the command line (terminal)) then you boot into read/write mode and changes are preserved across reboots.
Running a read only system (mostly) that you can change (by rebooting into read/write mode) is great IMO. In read only mode you can try things out, maybe trash the system, to then just reboot and be up and running again with all of those changes 'undone'.
In effect you're running the Live CD from HDD, and its quick in my experience, especially if you pick the LXDE Debian Jessie choice. Personally I'd hate to go back to full installs that can become corrupted relatively easily when permanently running in read/write mode.
I have mine pretty sparse, most of the apps I use are set to be launchable from the tray and a single auto generated icon (script that I wrote) to put a icon on the desktop (into ~/Desktop sub directory) indicating if I'm in read only (what I call USER mode) or read/write mode (what I call SYS-ADMIN mode).
My 64 bit PC blew up several months ago and as a temporary measure I switched over to a 2GB single core Celeron 32 bit reserve PC I had lying around and it runs so quickly I haven't got around to setting up the 64 bit replacement that I've had in the corner for a couple of months now.
One change to the liveCD version that's worthwhile IMO if you do 'install' it to HDD like the above is to change /etc/apt/sources.list to look something like (exact copy of mine) :
Code: Select all
deb http://http.debian.net/debian/ jessie main contrib non-free
deb-src http://http.debian.net/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
#Debian Multimedia
deb ftp://ftp.deb-multimedia.org jessie main non-free
# After that, to update the package list, do in terminal:
# apt-get install deb-multimedia-keyring
i.e. a more extensive repositories set than what comes on the LiveCD. For the multi-media you do have to run that apt-get command I noted in my copy after first running apt-get update in order to align the keys (otherwise synaptic will complain about a key being missing). Note that the first time you run apt-get update and then apt-get upgrade there's a large number of changes that are downloaded/applied to bring the system up to date, so be prepared for quite a bit of bandwidth and time to run that (and make sure you're in the read/write boot session otherwise all of the updates will be lost upon rebooting). Once things are up to date, typically I just run apt-get update and apt-get upgrade once every few days, even in read only mode, and if changes are apparent then I reboot to read/write mode and run that again so as to preserve the updates before rebooting back to read only mode again. The other inconvenience with read only mode is that you have to store docs and images etc outside of the system (on another partition such as sda4). Also bookmarks etc wont be stored across reboots (I have a limited few that I use anyway and I set them up whilst in read/write mode so they're always there for me now). But so also wont any virus or suchlike be preserved across reboots. In effect a factor fresh pristine system at each reboot (that's relatively easily updated).
Sorry about the length of this posting. Hope it helps you, if not others.