Debian installs
|
Author | Content |
---|---|
GDStewart Dec 17, 2007 7:28 PM EDT |
I did my first Debian install a couple of weeks ago and it went without a hitch or a hiccup. The only thing I missed in the install was setting up the video so it would do 1280 x 1024. I was rather annoyed that I couldn't find a way to fix that after the install. I had to re-install it (anybody know of a program that backs up partitions AND lets you re-install to smaller, but not too small, partitions ?) so I could install Red Hat 9 (don't ask) on the same drive. This time I got the resolution problem fixed but began having problems installing packages using Synaptic. I was getting package verification errors that I'd not seen with the original install and this was causing Synaptic to behave strangely. Turns out I'd downloaded a deb development based package verification package that was causing problems (?). After removing that package I was able to install the packages that were failing. All the apt/deb/Synaptic package installation/managing is a lot more complicated than it needs to be. I like Synaptic a lot and was already familiar with it since I am using it on a PCLinuxOS install. However, its "integration" with the older Debian package handlers can cause problems. |
hkwint Dec 18, 2007 2:44 AM EDT |
Quoting:anybody know of a program that backs up partitions AND lets you re-install to smaller, but not too small, partitions ? I'm not really sure, but do you mean 'shrinking' your current partitions without losing data to free HD space on which you can make new partitions? GParted should be capable of it - I have very been pleased with their LiveCD's it in the past, but nonetheless you should make a backup first, on another hard-disk or DVD. http://gparted.sourceforge.net/ It's not a bad idea to have a GParted LiveCD anyway; http://gparted-livecd.tuxfamily.org/ |
GDStewart Dec 18, 2007 2:29 PM EDT |
No, sorry I was not quite specific enough. Shrinking the size of the partitions is not the problem. Saving the contents of the partitions, re-partitioning the drive, and then restoring the partition contents is what I meant. Not expecting to use the drive for anything else I had used too many primary/extended partitions for the Debian install (I always do custom partitions on installs) and I needed to get one of them back. There are a couple of programs (Partimage and Clonezilla) that allows you to save a partition and then restore it, but only to a same size or larger partition. I needed to save several partitions and restore them to a smaller partitions. |
Sander_Marechal Dec 18, 2007 2:37 PM EDT |
May I suggest just backing up the whole heap to DVD or an external drive and implementing LVM? I've fell in love with it :-) |
Steven_Rosenber Dec 18, 2007 2:42 PM EDT |
Sander, once you've used LVM for the install, how do you manipulate the partitions after that? |
jdixon Dec 18, 2007 3:23 PM EDT |
> Saving the contents of the partitions. Partimage. See http://www.partimage.org/Main_Page It should be available for Debian with a simple apt-get. I'd recommend using either a Knoppix or a Mepis live CD though, both of which should include it. |
techiem2 Dec 18, 2007 6:21 PM EDT |
I keep a stack of SystemRescueCD discs to partimage and tweak partitions with. http://www.sysresccd.org/Main_Page |
rijelkentaurus Dec 18, 2007 7:31 PM EDT |
Quoting: The only thing I missed in the install was setting up the video so it would do 1280 x 1024. I was rather annoyed that I couldn't find a way to fix that after the install. As root from the command line: dpkg-reconfigure xserver-xorg |
Sander_Marechal Dec 18, 2007 10:32 PM EDT |
Quoting:once you've used LVM for the install, how do you manipulate the partitions after that? You don't :-D That's the beauty of it. You set up the partitions once (usually just one big partition per disk) and mark them as "physical volumes". Then you create a "volume group" by cobbling together those "physical volumes" into one big empty space. Then you can create "logical volumes" inside that volume group. Those are the ones you need to manipulate. Logical volumes behave much like partitions, but are more flexible because they are not bound to a disk. For example, I can create three 500 Gb physical volumes from three hard drives, create a 1.5 Tb volume group and then carve out a 1 Tb logical volume. Voila, a "partition" that spans multiple disks. Need to shrink it? Unmount the filesystem, shrink the filesystem, shrink the logical volume, remount. If the filesystem you used for the logical volume supports online resizing you won't even have to unmount. Bought a new disk? Create one big partition, mark it as physical volume, add it to the volume group and then you have new free space. You can use it to create new logical volumes or grow your existing ones. Basically, LVM is a way to seperate "partitions" (logical volumes) from hard drives. They become two unrelated things so you can mess with one and leave the other alone. Debian supports LVM from the installer. It's pretty easy to set up. Once you're set up, your logical volumes appear under /dev/mapper and can be treated like any regular partition. The only downside is that you don't know exactly what lives on which disk, which can be annoying if you have a machine with a lot of drives in it (My server has 8 now. And counting...). The solution is to create multiple volume groups. E.g, I have three hardware RAID arrays in my server. One 100 Gb, one 12 Gb and one 500 Gb. I cobbled together the 100 and 12 Gb arrays into one 112 Gb volume group. From there I create logical volumes for /home, /boot, /, etcetera. The 500 Gb array has a volume group of it's own with two logical volumes in it: /var/backups and /var/music. This way I know at least that all my music is on the 500 Gb array and not on one of the other arrays. |
ColonelPanik Dec 19, 2007 4:48 AM EDT |
Sander_M... Can you point us to a tutorial on this whole LVM thing? Better yet, just come over to my house and help us get it set up. I had it running on an early Ubuntu install and it seemed much quicker. |
hkwint Dec 19, 2007 6:08 AM EDT |
LVM is só 2004. EVMS is the way to go (it is a CLI/ncurses/GUI frontend to -amongst other things LVM2 and software-RAID, which means point and click), except it can 'lock your filesystem in very nastily' under very specific circumstances (you cannot shrink RAID-regions AFAIK, and that's just what I want to do). Speaking about a tutorial, I planned to write one, but then later always have believed their wasn't demand for it. However, if there's demand, I'll write one - including some screenshots. I once found a nice 'newbie-friendly' tutorial (both LVM2 and EVMS can be rather hard mainly because of terminology), but I can't find it. Till I have found or written one, I suggest you look at http://evms.sourceforge.net/user_guide/ |
Scott_Ruecker Dec 19, 2007 7:12 AM EDT |
I have used the GParted live disk several times including just last night. I wanted to get rid of three partitions on a little 12g hard drive and reformat to reiserfs. Why? Just for the Halibut..:-) bad joke, I know.. Really though, I am putting it together with a P3-750mhz, 256mg-RAM machine with PCLinuxOS on it to give to a friend who does not own anything. Why reiserfs on a 12g hard drive? I figured that in a little 12g reiserfs would be the fastest, not that you could tell on a hard drive that's only 12g. :-) Using GParted was as easy as pie, delete the existing, create a new one, or nine, write the changes, take it out and put in the distro of your pleasure...bang bang bang just like that, and I am on my way. Its a gift to use. After that you can get all crazy with LVM's and stuff but I have only tried it out recently with two hard drives, a 20g and the 12g I have been talking about. It was cool to do but I am short on hard drives.:-) I want to try it with a couple two three or four 320g or 420g hard drives and see what having some big partitions across multiple drives is really like. And you say I can put other even smaller partitions inside of those? What does a person do with two or three dozen partitions? Who can keep track of 20, 30 some odd partitions? It hurts my head just thinking about it. Its pure craziness I tell you! I am sure there are plenty of reasons, I was just trying to be funny. |
jdixon Dec 19, 2007 7:16 AM EDT |
People who run virtual machines may wish to give them their own partitions, and I've been told that many people separate /home, /var, and /usr out into separate partitions for each installed machine. |
Sander_Marechal Dec 19, 2007 7:38 AM EDT |
@jdixon: Yes, that's why I initially installed LVM, so each XEN guest could live in it's own LVM. Alas, Xen didn't work out for me, but rearraging the XEN server into a "regular" server proved to me how easy LVM is. @ColonelPanik: There's a thread here somewhere on LXer that explains it. I can post the link later. It's in my bookmarks on my other computer. |
hkwint Dec 19, 2007 12:44 PM EDT |
Quoting:What does a person do with two or three dozen partitions? Create 10 different sorts of filesystems on those partitions, mount those new partitions, create crypto-files on those new filesystems, export those files as partitions via the loopback-device, add those partitions together in some LVM-RAID-containers, add those LVM2 containers to one big container, then make two or three dozen partitions out of this new big container, and create file systems on those. Then do some benchmarking and make a 3D presentation of which mappings you actually created. See how far you can iterate the whole process, just because it's fun, and because it can be done! Don't forget to post a review on LXer, of course. |
Steven_Rosenber Dec 19, 2007 1:47 PM EDT |
I need a visual ... |
Sander_Marechal Dec 19, 2007 2:34 PM EDT |
hkwint wrote:
Quoting:<iteration ad absurdum> Sounds a bit like those guys (me!) setting up a dozen Xen guest just so they can cluster them together beowulf-style :-) |
Sander_Marechal Dec 19, 2007 3:06 PM EDT |
PS: The LVM thread I referred to is: http://lxer.com/module/forums/t/24435/ |
hkwint Dec 19, 2007 3:23 PM EDT |
Quoting:I need a visual ... Lucky you (I think it's on-topic to discussion partition management in this thread), that's the only part finished for my planned 'EVMS article'. It depicts the _real_ EVMS-scheme I'm using on this PC right now (so no fantasy-iterations), and it's over here: http://lxer.com/pub/files/hkwint/EVMS.png (For those who wonder: Graphic was made with kdissert) Start at the two grass-green blocks below in the picture (called sda and sdb), depicting my two Hitachi-HD's; they both contain a 'mint coloured' partition*, those both partitions are added to the RAID-container md0 (center of the picture), out of this md0 container (only) one LVM-container c1 is created (mint again, just above center). Out of this container, the 'black' partitions are created, pink filesystems are created, they are mounted at the yellow mountpoints. The most right 'black' box visualizes the 'free space', out of which I can make new partitions whenever I like. Note, GRUB can't boot from EVMS, since GRUB is not aware of EVMS. This could be bypassed with an initrd, but since I don't use Debian - which comes with pre-made initrd's and mkinitrd commands, I had to build the whole initrd from scratch myself which failed. Therefore, I use a 'pre-root' partition outside of EVMS; which is depicted in the yellow box left below in the picture. sda2, sdb1 and sdb2 are not used at this moment - they can be used to install WinXP (which takes some 'WinHacks' to fit into 3Gb nicely if you want SP2 and AutoCAD running on it), or as swap, or to install another Linux-distro. I also made a screenshot of the EVMS-GUI accompanying the given scheme; http://lxer.com/pub/files/hkwint/EVMS_GUI.png *those partitions sda3 and sdb3 were made with fdisk/cfdisk with the type '8e' representing LVM; no filesystem is made on them. For completeness sake, here's what 'cfdisk' for sda looks like: http://lxer.com/pub/files/hkwint/cfdisk_sda.png |
ComputerBob Dec 22, 2007 5:26 AM EDT |
I've updated My Debian Adventure to explain why I reinstalled Debian four separate times a few nights ago. ;) |
dinotrac Dec 22, 2007 8:28 AM EDT |
>Create 10 different sorts of filesystems on those partitions, mount those new partitions An extreme case, I'm sure, but most linux users should be very familiar with creating different partitions to host different filesystems -- at least if you stretch the idea of a filesystem to include the swap pages. If you have particular file use patterns that match the strengths of a particular file system -- reiserfs, for example, is very good with lots of small files -- you can set up a partition for that part of your work. As a myth user with his backend running on my regular workstation, I have one partition set up with JFS to hold program recordings because JFS deletes very large files gracefully. |
Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]
Becoming a member of LXer is easy and free. Join Us!