LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2014, 07:02 PM   #1
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Rep: Reputation: 1
Installing Debian on an external SSD disk


I want fresh install Debian on an external SSD disk. The PC RAM is 3GB and SSD size 30GB. What would be optimal partitioning scheme, and how to put swap on the internal harddisk? I want also to reserve 10 percent for unallocated space (for overprovisioning) when partitioning. How to make this when run Debian installation from DVD?

Last edited by dorsio; 04-16-2014 at 07:03 PM.
 
Old 04-16-2014, 08:05 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
Quote:
What would be optimal partitioning scheme
'Optimal partitioning' is going to vary by user and needs. The simplest thing to do is just create on root partition for the filesystem and make it 27GB which leaves your 10% for whatever. Putting swap on the internal should be doable but not knowing what your partitioning is on the internal there's no way to give specific advice. I would suggest you select the Manual or Expert option in install so you have more control and see what is happening. I haven't installed Debian for some time so don't know what the option is. Probably a Debian user will come along with a more specific recommendation.
 
Old 04-17-2014, 09:28 AM   #3
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
Internal hard disk have Windows 7 installed, NTFS file system.
 
Old 04-17-2014, 09:40 AM   #4
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Rep: Reputation: 174Reputation: 174
I have a very fat LMDE (essentially Ubuntu style Debian testing). About 2,900 packages.
My / was initially allocated as 50GB - but only 14GB is used!

A separate much bigger partition was allocated for /home - do this and you can install a new distro over the top of an old one.

I don't bother with a swap partition - you can create swap file(s) later, if necessary.
 
Old 04-17-2014, 10:31 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
Your installer should show the drives/partitions as well as the filesystem type so you will know which are windows and not install over them accidentally. It should be easy to differentiate between the drives as the size will be shown and I expect your internal with windows 7 is larger than 30GB.
 
Old 04-18-2014, 02:36 PM   #6
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
I understand that partitioning scheme depends on SSD disk size and what packages will be used. The SSD disk is 30GB and it's intended for Debian Linux, linux applications and tools, not too big. I don't plan use disk to store images, videos or large files.

Last edited by dorsio; 04-18-2014 at 02:54 PM.
 
Old 04-19-2014, 02:58 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,030

Rep: Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623
With only* 30GB to use I would be tempted to use one big partition and just restore data from backup when it comes to upgrading to a new Debian release. I say that because while it is possible to get Debian's root to fit into a a partition of around 7GB (this EEE PC is currently using 6.5GB of the root drive) it is also possible, as I have done on my desktop, to use 18GB or so for root .
The options of having separate partitions for root and home limits one to 10GB for root and 20GB for home, 20GB for root and 10GB for home or 15GB for both. I would say all are wasteful in some way, hence my recommendation of just the one partition.
For swap you will probably need to resize your Windows partition so it may be an idea to defrag the Windows drive so that it is safer to resize it.

*30GB isn't small per se it's just not large enough that you can afford to waste much space.

Last edited by 273; 04-19-2014 at 02:59 PM.
 
Old 04-19-2014, 04:07 PM   #8
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
I will create one large partition for root. The Swap space will be 2GB. If to setup a dedicated swap-partition on a system internal HDD (Windows), does it require to resize Windows partition? Also, is there a need to have a separate /boot partition on SSD?
 
Old 04-19-2014, 04:16 PM   #9
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,030

Rep: Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623
If you want to put a swap partition on the hard drive you use for Windows then yes you will need to shrink the Windows partition[s] to create a swap partition on that drive. There is very little need to use a separate /boot partition nowadays that I am aware of. Using separate partitions for various directories has tended to be something more for use with servers where separate drives are used or there is a need to ensure that one directory like /var doesn't use all the available space and kill the system (I'm simplifying and I'm sure I will be corrected if I'm generalising wrongly). Having a separate home partition can be useful when first using Linux as if you break things and have to reinstall your home can remain untouched but it can cause issues also so simply having a backup of important date (which everyone ought to have as a matter of course) can be preferable.
 
Old 04-23-2014, 08:38 AM   #10
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
I will put 2GB swap on SSD, and set one 25GB partition for / root, and the rest will be unallocated space (10 percent). How to make this partitionning after launching the installer, in detail?
 
Old 04-23-2014, 09:24 AM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,330
Blog Entries: 1

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
You can use swap files. Not as fast, but just as useful. With dd to make them, mkswap to format them, and swapon to mount them.

If you're not doing anything server-ish, you could use just one partition per distro. I tend to have two distros per disc installed normally. Not that I use both, but there's a peace of mind knowing that I could destroy my main distro and still boot a usable linux.
 
Old 04-23-2014, 03:43 PM   #12
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
Do you mean create swap files after installing Linux? As I'm going to install Linux for the first time, I just wanna make a regular Debian installation.
 
Old 04-24-2014, 08:31 AM   #13
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,330
Blog Entries: 1

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
It depends on how you install debian. If you partition and format the filesystem before the install you could make the swap file(s) before or after the actual installation. Swap kicks in when you run low on or out of RAM to allocate to processes, so as long as you have swap before that happens (if that happens), you're okay. Depending on how you use your system and how much RAM is on the system, it could be argued that you don't need swap. But knowing what happens when you do need it and it's not there, it's still a good idea to have swap.

# dd if=/dev/zero of=swapfile.swap bs=1M count=100
(creates a 100MB file)

# mkswap -v1 swapfile.swap
(formats the file to a swap filesystem)

# swapon swapfile.swap
(adds the swapfile.swap to your swap space)

# swapon -s
(lists your swap space to verify success, you can also see swap specs with "free")

# swapoff swapfile.swap
(removes the swapfile.swap from your swap space)

In the case of a partition for swap, you would mkswap the /dev/ of the partition. Although distro installers tend to do that for you. So not really something you need to concern yourself with. Just know that it's an option if you want to know of swap, or do things manually. The # denotes as root, so prefix with sudo if using a distro like ubuntu. Also note that if you go that route you'll need an entry in /etc/fstab to mount the swap file automatically at boot time.

One advantage of swap files is that you can have more than one, and if it ends up that you need the drive space more than all of the swap files you can stop using one or more of those files and free up the drive space. Without having to resize partitions and other things you feel even less comfortable with. It's not all roses though as swap files are slower than dedicated partitions as they are a swap filesystem formated in a file on another filesystem.

Probably TMI, but just know that it's an option. One of many.
 
Old 04-24-2014, 06:46 PM   #14
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
I have 3GB RAM, is it enough not to use swap?
 
Old 04-25-2014, 12:42 AM   #15
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,330
Blog Entries: 1

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
In theory. But if you're the type to have hulu, netflix, youtube, and other things open, at the same time, plus 100+ other tabs in a single browser, then no. Or yes, if you run out of ram and you don't have swap, then the linux kernel goes into offensive mode and starts freeing up ram by killing applications other than the linux kernel.

Although these days, apps that know that they are likely to use more than available ram do so with large files in /tmp/, instead of swap providing potentially unlimited RAM via virtual ram (swap). My 2GB desktop rarely crests 1.5GB of ram usage, but I'm RAM aware. And up until recently only had 1GB of ram on this machine. You don't need it, until you need it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing ubuntu 11.04 in external hard disk summit Linux - Newbie 20 04-18-2012 02:56 PM
Debian installed on usb external hard disk doesn't run ospaco69 Linux - Newbie 24 08-24-2011 01:44 PM
External Hard Disk for both Debian & MS gnath Debian 1 01-06-2010 04:20 AM
Installing Slackware 13 in an external USB disk Alexvader Slackware - Installation 2 11-01-2009 06:28 AM
installing linux in an external hard disk Arythan Linux - Newbie 1 08-31-2004 06:22 AM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration