HOWTO: Debian netinstall
Forum rules
Share your brain ;)
Share your brain ;)
HOWTO: Debian netinstall
Is there anyone here who has not done a Debian netinstall? If you haven't tried it, I think you should, if only to see how easy it really is, and to have the opportunity to select just exactly what you really need in your custom install. You will also see the dependencies for everything you install, and you may be surprised (and shocked) by how much crap your icon theme or terminal emulator really pulls in.
I should also just say here that I do not mean in any way to say that mb has not done excellent work with the bbq spins -- I only want to present another learning opportunity to those of us how do this as a hobby and/or like to try new things.
Please don't do this on a production machine, on your girlfriend's machine, or anywhere you can't bork. Breaking a netinstall is not bad -- it will teach you lots of things just installing a pre-built spin will not, but you don't want to break your main install today.
Getting started
Download the "mini iso" from here for 32-bit or here for 64-bit. Copy it to a USB stick or CD as usual.
Prepare a partition on a test machine; you will only need a single root partition of around 6G max, unless you plan to really pimp it out with a bunch of bloat (and if that's your plan, stop reading now and go install a pre-made bbq spin). Also create a swap partition if you want to use one and there is not one on the disk already.
Netinstall!
Boot the USB or CD, and select "Advanced options" then "Expert install" -- there are a lot of steps, but most of them should be intiuitive, if not obvious. For most of the first few screens you can simply accept the defaults -- Choose language (accept the defaults if you want English) do not select any additional locales unless you know you need them, Configure the keyboard (accept the default again unless you know what you are doing) Detect network hardware, Auto configure networking (again the defaults should be fine on a wired machine), enter your hostname, accept the default domain name, http protocol for the mirror, select your country, accept the default mirror, leave the proxy blank unless you know you need to enter something.
"Debian version to install" select "sid" then let the installer download installer components. Do not select any additional installer components to load, just "Continue" and let the installer load what it needs.
"Set up users and passwords" -- Yes enable shadow passwords. Do not allow login as root (you will install a user with sudo privileges and can enable the root account later -- this is easier than allowing root login and adding a user later). Enter your user name and username for your account, then enter your new user's password.
"Configure the clock" -- set the clock using ntp, accept the default ntp server, and select your time zone.
"Detect disks" -- allow the installer to detect your hardware. "Partition disks" select "Manual" -- select the partition where you want to install, then "use as" select ext4, "format the partition" select "yes", "mount point" select "/ - the root file system". Select "Done setting up the partition" Here you can select other partitions for boot and home if you like, but it's simpler to just use one partition for everything.
In the right column of the screen you should now see which partitions will be used for root (and swap, if you have one). Select "Finish partitioning and write changes to disk". Make sure the partitions are set up the way you want them on the next screen (if you made a mistake you can go back and fix it) and then "Yes" for "Write changes to disk".
"Install the base system" -- let the installer do its work. It's downloading everything from the mirror, so it will take a while. At some point you will be asked which kernel you want. On a 32-bit box, select "linux-image-686-pae"; on 64-bit select "linux-image-amd64" (if you have a machine that requires a 486 kernel select "linux-image-486").
"Drivers to include in the initrd" -- select "targeted..."
"Configure the package manager" -- "use non-free software 'yes'" unless you are rms. If you say "no" here you can always enable it later.
"Select and install software" -- the installer does some preconfiguration, then you decide whether to participate in the usage survey.
"Choose software to install" -- use the arrow and space keys to unselect everything except "Standard system utilities" -- this is important -- you can install everything else later. The installer will go do its work. Again it is pulling things from the mirror, so be patient. This takes a little longer than installing the base system.
"Install the GRUB bootloader on a hard disk" -- do this if your netinstall is the only thing on the disk, or if you want your netinstall to control GRUB. Tell the installer where it should install GRUB. You can skip this step if you have another install already controlling GRUB (you will need to update-grub there later) -- if this is the case, select "Continue without bootloader".
"Finish the installation" -- almost done! -- "Yes" the system clock is set to UTC (it is, right?) -- "Installation complete" !!
Your machine should now reboot, either into GRUB for your netinstall, or GRUB for your other install if you did not install GRUB during the netinstall. Run "sudo update-grub" in your other install to find the new install, and reboot. You will boot to a console login -- login as the user you created, and enable the root account with "sudo passwd root".
Next step (maybe tomorrow) we will install some handy console tools, X (with a terminal emulator and a window manager), systemd, and some siduction and bbq sources. (see this post).
Screenshot or it didn't happen :)
I should also just say here that I do not mean in any way to say that mb has not done excellent work with the bbq spins -- I only want to present another learning opportunity to those of us how do this as a hobby and/or like to try new things.
Please don't do this on a production machine, on your girlfriend's machine, or anywhere you can't bork. Breaking a netinstall is not bad -- it will teach you lots of things just installing a pre-built spin will not, but you don't want to break your main install today.
Getting started
Download the "mini iso" from here for 32-bit or here for 64-bit. Copy it to a USB stick or CD as usual.
Prepare a partition on a test machine; you will only need a single root partition of around 6G max, unless you plan to really pimp it out with a bunch of bloat (and if that's your plan, stop reading now and go install a pre-made bbq spin). Also create a swap partition if you want to use one and there is not one on the disk already.
Netinstall!
Boot the USB or CD, and select "Advanced options" then "Expert install" -- there are a lot of steps, but most of them should be intiuitive, if not obvious. For most of the first few screens you can simply accept the defaults -- Choose language (accept the defaults if you want English) do not select any additional locales unless you know you need them, Configure the keyboard (accept the default again unless you know what you are doing) Detect network hardware, Auto configure networking (again the defaults should be fine on a wired machine), enter your hostname, accept the default domain name, http protocol for the mirror, select your country, accept the default mirror, leave the proxy blank unless you know you need to enter something.
"Debian version to install" select "sid" then let the installer download installer components. Do not select any additional installer components to load, just "Continue" and let the installer load what it needs.
"Set up users and passwords" -- Yes enable shadow passwords. Do not allow login as root (you will install a user with sudo privileges and can enable the root account later -- this is easier than allowing root login and adding a user later). Enter your user name and username for your account, then enter your new user's password.
"Configure the clock" -- set the clock using ntp, accept the default ntp server, and select your time zone.
"Detect disks" -- allow the installer to detect your hardware. "Partition disks" select "Manual" -- select the partition where you want to install, then "use as" select ext4, "format the partition" select "yes", "mount point" select "/ - the root file system". Select "Done setting up the partition" Here you can select other partitions for boot and home if you like, but it's simpler to just use one partition for everything.
In the right column of the screen you should now see which partitions will be used for root (and swap, if you have one). Select "Finish partitioning and write changes to disk". Make sure the partitions are set up the way you want them on the next screen (if you made a mistake you can go back and fix it) and then "Yes" for "Write changes to disk".
"Install the base system" -- let the installer do its work. It's downloading everything from the mirror, so it will take a while. At some point you will be asked which kernel you want. On a 32-bit box, select "linux-image-686-pae"; on 64-bit select "linux-image-amd64" (if you have a machine that requires a 486 kernel select "linux-image-486").
"Drivers to include in the initrd" -- select "targeted..."
"Configure the package manager" -- "use non-free software 'yes'" unless you are rms. If you say "no" here you can always enable it later.
"Select and install software" -- the installer does some preconfiguration, then you decide whether to participate in the usage survey.
"Choose software to install" -- use the arrow and space keys to unselect everything except "Standard system utilities" -- this is important -- you can install everything else later. The installer will go do its work. Again it is pulling things from the mirror, so be patient. This takes a little longer than installing the base system.
"Install the GRUB bootloader on a hard disk" -- do this if your netinstall is the only thing on the disk, or if you want your netinstall to control GRUB. Tell the installer where it should install GRUB. You can skip this step if you have another install already controlling GRUB (you will need to update-grub there later) -- if this is the case, select "Continue without bootloader".
"Finish the installation" -- almost done! -- "Yes" the system clock is set to UTC (it is, right?) -- "Installation complete" !!
Your machine should now reboot, either into GRUB for your netinstall, or GRUB for your other install if you did not install GRUB during the netinstall. Run "sudo update-grub" in your other install to find the new install, and reboot. You will boot to a console login -- login as the user you created, and enable the root account with "sudo passwd root".
Next step (maybe tomorrow) we will install some handy console tools, X (with a terminal emulator and a window manager), systemd, and some siduction and bbq sources. (see this post).
Screenshot or it didn't happen :)
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: HOWTO: Debian netinstall with some bbq sauce
nice howto pids
I might have to do a better install, i think i just hit 'install' seemed to bring in most of what i needed for a server.
I might have to do a better install, i think i just hit 'install' seemed to bring in most of what i needed for a server.
Re: HOWTO: Debian netinstall with some bbq sauce
Nice HOWTO, pids. I've only ever done full DE installs via Debian netinstall, usually Xfce or LXDE, but I've also done Gnome and KDE, in my bloat-loving days. I really need to do it up starting with no X, and build my perfect system.
Re: HOWTO: Debian netinstall with some bbq sauce
*DJ's Stamp of Approval*
I think we've previously discussed the difference in methods, but Pidsley's system is probably the quickest way to get a minimal Sid. I normally build stable, change repos and then dist-upgrade...which is a little longer. I've yet to use this method, but I've been keeping it on the back-burner should I ever need to reinstall. Thanks for sharing.
I think we've previously discussed the difference in methods, but Pidsley's system is probably the quickest way to get a minimal Sid. I normally build stable, change repos and then dist-upgrade...which is a little longer. I've yet to use this method, but I've been keeping it on the back-burner should I ever need to reinstall. Thanks for sharing.
Re: HOWTO: Debian netinstall with some bbq sauce
Thanks pids, and very well written. Nice rainy day project.
Work hard; Complain less
Re: HOWTO: Debian netinstall with some bbq sauce
Nice. Looking forward to the rest. I usually also choose "laptop utilities" during install. AFAIK it doesn't pull anything I would not have chosen for my laptop afterwards.
Re: HOWTO: Debian netinstall
I have decided that there are enough guides for what to do next with a netinstall (DJ and bacon have both written at least one) and that most people here probably know what to do next anyway. If someone else wants to pick this up and expand on it, please feel free. Otherwise, I'm done.
Re: HOWTO: Debian netinstall
Only one computer here, two of us use it. I did this once, 15 months ago ...Please don't do this on a production machine, on your girlfriend's machine, or anywhere you can't bork. Breaking a netinstall is not bad -- it will teach you lots of things just installing a pre-built spin will not, but you don't want to break your main install today.
let me make that clear, I used the Debian Net Installer ... but not this HowTo
As I recall it, the installer part (selecting partitions to use) isn't any different that other debian installers ... soooo why would doing this be different than installing another spin/distro?
I am THE resident noob, hands down no discussion. ... and
I wear my soap on a rope.
I wear my soap on a rope.
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: HOWTO: Debian netinstall
expert install, probably.
hitting 'install' walks you through it (as i did), pidsley did it from a very base stance (and changes to sid right away), respect.
hitting 'install' walks you through it (as i did), pidsley did it from a very base stance (and changes to sid right away), respect.
Re: HOWTO: Debian netinstall
The largest reason to take the expert-mode netinstall method is that it's the easiest way to get only the packages that the user wants. It puts control directly in the hands of who's doing the install.
Re: HOWTO: Debian netinstall
OK I don't think I worded that right ... I too used the "Expert Install".
I was wondering about the part that this is more dangerous that a regular distro Live CD install.
If I recall, it still uses gparted to select partitions and installs Grub in the same manner as a Live*.
Just a thought.
I was wondering about the part that this is more dangerous that a regular distro Live CD install.
If I recall, it still uses gparted to select partitions and installs Grub in the same manner as a Live*.
Just a thought.
I am THE resident noob, hands down no discussion. ... and
I wear my soap on a rope.
I wear my soap on a rope.
Re: HOWTO: Debian netinstall
Damn, I should've read this how-to before doing it all by myself. I mean, it's working and I'm happy, but I chose "generic" instead of "targeted" at "Drivers to include in the initrd". I must say it, I was scared.
Re: HOWTO: Debian netinstall
@pidsley that's very nice and clear - thank you. A good post to link to in the future. (That would be OK right?)
btw what does that "targeted" driver option do?
btw what does that "targeted" driver option do?
All code is one.
Re: HOWTO: Debian netinstall
Short answer: it causes the installer to build an initrd (actually an initramfs) that contains only the drivers it thinks you need.johnraff wrote:btw what does that "targeted" driver option do?
Long answer: it causes the installer to create a file called "driver-policy" in the /etc/initramfs-tools/conf.d/ directory. This file contains the line "Modules=dep" and this overrides the normal "MODULES=most" line in /etc/initramfs-tools/initramfs.conf, causing the initrd to be built with only drivers the system is aware you need when the initrd is built. For example, an "untargeted" initrd contains drivers for almost all hard disk controllers, while the "targeted" initrd only contains the driver for the controller in the machine where the system was installed. Including only the necessary drivers reduces the size of the initrd considerably (from around 14M to around 3M on my machines), and can reduce the amount of time it takes to rebuild the initrd every time this is necessary (watch during your next dist-upgrade and see how many times the initramfs is updated). It can, however, cause problems if you later add something that depends on a driver being present in your initrd, or (for example) try to use the same hard disk install in another machine without rebuilding the initrd. I have always specified "targeted" in my several netinstalls, and I have never had a problem.
GekkoP, I believe you can rebuild your initrd with targeted drivers by adding the driver-policy file as described above and using update-initramfs to rebuild the initrd, but if the way you have it set up now is working, there's really no reason to change it.
More information in the Debian wiki: https://wiki.debian.org/Initrd
More about initrd: http://www.ibm.com/developerworks/linux ... /l-initrd/ and https://en.wikipedia.org/wiki/Initrd
How to examine the contents of your initrd: http://linuxpoison.blogspot.com/2010/03 ... image.html
Re: HOWTO: Debian netinstall
Thanks for this explanation.
I'll follow your advice and keep my system as it is since it is working very well. To be honest, it's not doing very much: print server, ps3 media server, vino and transmission are the only things I use it for at the moment. But I'll pay attention to this "targeted" detail next time I do a netinstall and keep in mind to give it a try.
I'll follow your advice and keep my system as it is since it is working very well. To be honest, it's not doing very much: print server, ps3 media server, vino and transmission are the only things I use it for at the moment. But I'll pay attention to this "targeted" detail next time I do a netinstall and keep in mind to give it a try.
Re: HOWTO: Debian netinstall
Thanks pidsley.
Yes, I've tapped many an impatient finger waiting for initramfs to be rebuilt.pidsley wrote:Including only the necessary drivers reduces the size of the initrd considerably (from around 14M to around 3M on my machines), and can reduce the amount of time it takes to rebuild the initrd every time this is necessary (watch during your next dist-upgrade and see how many times the initramfs is updated).
All code is one.
Re: HOWTO: Debian netinstall
Does using 'targeted' on install, or implementing it post install, result in any noticeable performance gains? i.e. boot speed, memory footprint . . .
I would try this myself but no access to Linux for a day or two.
I would try this myself but no access to Linux for a day or two.
^ [EDIT] . . . nvm - I read the docs pidsley quoted. Yes, that is all that is required.If I understand correctly:
if I add a line
in fileCode: Select all
Modules=dep
. . . and then rebuild initramfs, that should be all that's required?Code: Select all
/etc/initramfs-tools/conf.d/driver-policy
The Beaver Destroys Forests
Re: HOWTO: Debian netinstall
TESTING COMPLETED
Pre update-initramfs
initrd is 13.0MB.
I shutdown and restarted the pc 5 times to get some averages.
Average Memory use ~84Mb (Conky)
Average boot time ~13.5 seconds (systemd-analyze)
Post update-initramfs
initrd is 8.4MB
Shutdown and restart * 5
Average Memory use ~84Mb (Conky)
Average boot time ~11.4 seconds (systemd-analyze)
RESULTS:
over 2 seconds shaved off kernel time
CONCLUSION:
Worthwhile? Yes! :)
Pre update-initramfs
initrd is 13.0MB.
I shutdown and restarted the pc 5 times to get some averages.
Average Memory use ~84Mb (Conky)
Average boot time ~13.5 seconds (systemd-analyze)
Post update-initramfs
initrd is 8.4MB
Shutdown and restart * 5
Average Memory use ~84Mb (Conky)
Average boot time ~11.4 seconds (systemd-analyze)
RESULTS:
over 2 seconds shaved off kernel time
CONCLUSION:
Worthwhile? Yes! :)
The Beaver Destroys Forests
Re: HOWTO: Debian netinstall
Nice. I'll try that too. To be honest boot on my machine is pretty fast right now, but since it is a quick fix I'm going to check out whether there is a difference or not.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: HOWTO: Debian netinstall
@gurtid: the real advantage is, as pid pointed out, when you run upgrades and the ramdisk is updated. as for the 2 seconds shaved off on boot: lol :) obviously time for a ssd :D
..gnutella..