LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 12-14-2007, 05:45 AM   #1
gumb
Member
 
Registered: Oct 2005
Distribution: openSUSE
Posts: 38

Rep: Reputation: 15
Question Repartitioning in YaST without losing data


I've just installed openSUSE 10.3 on a fresh SATA drive but the BIOS seems to have an issue with the exact configuration, whereby everything is housed within one extended partition. The motherboard / BIOS support both PATA / SATA but I think the issue is that the boot partition needs to be a primary one to be recognised properly, if I still intend to use the secondary IDE ports for my CD drives. Without the 2nd IDE ports it is able to boot from a logical drive instead, but neither of those scenarios is what I set up so now I'm stuck, and have to enter the BIOS on each boot before it will load Linux.

So what I want to do now is reassign the /boot partition to Primary, however this will mess up the numbering of the other drives, which are as follows:

Code:
/dev/sda1  465.7GB  Extended           0     60800
/dev/sda5   70.5MB  Linux ext3  /boot  0     8
/dev/sda6    2.0GB  Linux swap  swap   9     270
/dev/sda7   20.0GB  Linux ext3  /      271   2881
/dev/sda8  443.6GB  Linux ext3  /home  2882  60800
How can I use YaST's Boot Loader and/or Partitioner to put /boot on a new primary /dev/sda1 partition that uses the same disk cylinders 0 to 8, then recreate the extended partition as /dev/sda2 using the cylinders 9 to 60800, but not lose access to all my data on the drives? Do I simply need to re-edit fstab with the changed numbers (i.e. so that sda6 becomes sda5 etc.), and are there other implications or files that are going to be corrupted?
 
Old 12-16-2007, 09:38 PM   #2
Lord Ghost
Member
 
Registered: Jul 2003
Posts: 68

Rep: Reputation: 15
In a situation like this, your best bet is to do a backup of your /home folder and reinstall. You'll keep all your settings and personal data that way.

What you are describing as a situation is not simple at all. First, moving /boot requires a lot of grub loving, and is something you shouldn't even consider unless you think recompiling a kernel is cake. If you think that, then you already know everything you need to do to fix this issue, because you've probably written code for Linux already and regularly discuss the pros and cons to xfs vs. ext3.

Since you're asking in here, I'm going to guess you are not a god-like Linux guru, and I would seriously suggest you simply do a backup of your /home directory, wipe the system, install it properly, copy the contents of your home directory back into your new place, and live happily ever after. And don't EVER use an extended partition setup.

Seriously, you don't want to go this route...here be dragoons.

Cheers,
Ghost
 
Old 12-23-2007, 10:18 AM   #3
gumb
Member
 
Registered: Oct 2005
Distribution: openSUSE
Posts: 38

Original Poster
Rep: Reputation: 15
I've decided to take a different approach. I wouldn't normally throw money at a problem to try and solve it, but I think this might be the best way and would provide a few other side benefits. After a bit of experimenting, I'm fairly certain now that the issue isn't with the location of grub and the type of partition. Rather, I think the BIOS baulks at this exact configuration for some reason. Possibly, changing the jumper settings on the IDE drives and/or swapping the SATA drive to the spare port would resolve things, though the configuration I have seems the most logical to me, so I can't be bothered trying every possible alternative.

I have come to this conclusion after noticing that if I set the SATA configuration in the BIOS to Auto, after a few more boots it finds its own working configuration that allows the system to boot every time, but at the expense of it dumping the IDE ports entirely. I've also tried this workaround with manual settings but it never quite seems to take effect, it only does it on Auto.

So instead, I'm going to purchase a SATA DVD-rewriter as a single replacement for the existing PATA CD-ROM and DVD-RW drives. This way I'll do away with any possible PATA-SATA conflict altogether. The system doesn't need both drives, besides which decent DVD-RW drives are cheap enough these days and the new one provides some side benefits of things like faster read/write speeds and LightScribe technology. If that doesn't work, I'll be back here moaning!

(only after the motherboard has been the victim of a mysterious homicide)

Last edited by gumb; 12-23-2007 at 10:24 AM. Reason: forgot to mention a key part of my conclusion!
 
Old 12-23-2007, 10:33 AM   #4
Lord Ghost
Member
 
Registered: Jul 2003
Posts: 68

Rep: Reputation: 15
Although I'm sure that will be a viable option, please note that you're still going to have an extended partition.

This alone is reason enough to wipe and reinstall.

Extended partitions are not known for A) Performance B) Stability.

If something happens to the extended partition, you lose all the partitions within.

Reformatting and reinstalling will give you separate partitions that will be just a touch more secure. (For a level above that, I prefer that my /home directory is on a separate drive from the / directory.)

Other than that, it sounds like you did some good hunting to figure out a work-around. Nice job.

Cheers,
Ghost
 
Old 12-23-2007, 10:54 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
This is a wild story saying /boot must be a primary in order for it to be booted.

First I never put /boot outside /. In other word my /boot is always a subdirectory to / and so every Linux I installed I use just one partition.

On record this thread shows

Suse 10.0 installed in hda43
Suse 9.1 in hdc57
Suse 10.1 in sdb11

As any partition above the 4th is logical the above show different versions of Suse Linux can all be booted from a logical partition.

I reserve primaries for M$ systems, Solaris and BSD and do not share any concern of using logical partition to install and boot Linux.

Only M$ systems, Solaris and most of the BSD need to be booted from a primary. This is because their boot loaders follow the Dos tradition of searching from the 4 primaries and boot the one with the booting flag switched on. I have actually used this characteristic to make a Vista to boot up Grub residing in a data-only primary partition!

Linux boot loaders like Grub and and Lilo always declare which partition is to be booted up front, in Grub by the "root" statement and in Lilo by either "other=" or "root=" statement. Thus Linux can boot from any partition regardless it is a primary or logical. Linux never has to use the booting flag.

Last edited by saikee; 12-23-2007 at 11:07 AM.
 
Old 12-23-2007, 11:12 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Why did you make the one and only partition an extended partition? The YaST2 partition may be able to change it. If this is a fresh installation, reinstalling would probably be quicker.

If you use raid or lvm, it is best to have a partition for /boot. That way there isn't a problem loading the kernel and initrd which may be needed to assemble the md device.

Another advantage, is that being so small, it is easy to backup. You can use dd & gzip to create a compressed backup of the /boot partition.
 
Old 12-23-2007, 11:51 AM   #7
Lord Ghost
Member
 
Registered: Jul 2003
Posts: 68

Rep: Reputation: 15
Quote:
Originally Posted by saikee View Post
This is a wild story saying /boot must be a primary in order for it to be booted...
*SNIP*

Ummm...nobody said it couldn't be booted if it wasn't a primary partition.

I just said using an extended partition for all directories is just begging for trouble.

My standard installation of ANY Linux OS is as follows:

Mount point: /
Mount point: /home/user
Mount point: swap

Done.

And I only do that because I've had / get screwed up from my own experiments and then take hours to customize it exactly how I want it again.

Cheers,
Ghost
 
Old 12-23-2007, 01:49 PM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Lord Ghost

You quoted
Quote:
Ummm...nobody said it couldn't be booted if it wasn't a primary partition.
OP gumb quoted

Quote:
but I think the issue is that the boot partition needs to be a primary one to be recognized properly
I stepped in thinking that OP belief to be a misconception. I proved with examples and explanations.

Also I believe the quote

Quote:
I just said using an extended partition for all directories is just begging for trouble.
to be a misinformation or a rumour and would be interested to see evidence to back this up as it is completely different to my experience. I simply never put Linux in anything other than logical partitions totally inside an extended partition. I still have several hard disk with hda5 to hda63 each filled with a bootable Linux. I must have missed the trouble somehow.

One can have a bad experience with any particular arrangement but it may not necessarily be the truth.

Last edited by saikee; 12-23-2007 at 01:54 PM.
 
Old 12-23-2007, 02:22 PM   #9
gumb
Member
 
Registered: Oct 2005
Distribution: openSUSE
Posts: 38

Original Poster
Rep: Reputation: 15
Blimey! I hadn't expect my dull concluding remarks to spark this debate into life.

FWIW, when I installed openSUSE 10.3, I completely followed and accepted the default partitioning scheme offered to me during the YaST setup (which just happened to offer pretty much what I had in mind anyway), so the worthiness - or not - of such a scheme with everything crammed into one extended partition should best be taken up with the openSUSE developers, or those of Grub / Novell / whoever.

I'm desperately hoping the new drive will cure all the problems when it arrives, since I've done so much work tweaking the OS for four users, in addition to making all kinds of overall system setting changes, that reinstallation now would take forever, and I've already had two weeks holiday from work to spare in getting it all sorted this far!
 
Old 12-23-2007, 02:32 PM   #10
Lord Ghost
Member
 
Registered: Jul 2003
Posts: 68

Rep: Reputation: 15
Quote:
Originally Posted by saikee View Post
to be a misinformation and would be interested to see evidence to back this up as it is completely different to my experience. I simply never put Linux in anything other than logical partitions totally inside an extended partition. I still have several hard disk with hda5 to hda63 each filled with a bootable Linux. I must have missed the trouble somehow.
It's not a question of it being a problem with Linux. It's with any operating system.

#1: It's confusing to new users.
#2: It is not always functional depending on the OS. Some have issues with booting from logical drives. I believe Red Hat was one a few years back that would fail if you did so. The newer OSes that are out I don't know if they work fine or not, as I've never needed more than 3 partitions (/ swap and /home) so...I've not used an extended partition since the day I decided to not be cheap and just get a second drive for my Windows testing.
#3: It's not necessary if you only have one OS on the drive. What is the point of slapping 256 billion partitions on one drive, other than you can do so?
#4: If you have more than one OS, you still run into the danger of a non-bootable partition even if it's capable of booting from an extended drive, due to the boot sector limits, so again, it's better to have 2 drives (one for each OS) than it is to use an extended partition, IMHO.
#5: If I recall correctly, fdisk /mbr will not resolve an issue with an extended partition. I may be mistaken on this point, and if I am, so be it.
#6: From what I remember, if you have a sector issue in a logical drive/extended partition, you lose it all, not just the one logical drive. Again, if I'm wrong, fine. It's been a few years since I've bothered with extended partitions because of the headaches they caused.
#7: Not all partitioning programs handle extended partitions the same way. Because of this, using one and then trying to fix, grow, shrink, or in some other way, modify the partition with another program (which is fairly commonplace when someone is trying to fix an issue.."Oh, this one didn't work, I'll go download this program and try it"..."Oh, someone said this program might work..." etc. Been there, done that.), can very well create a world of hurt. Ironically, all partitioning programs happen to see PRIMARY PARTITIONS the EXACT SAME WAY, thus minimizing the risks and dangers, especially to NEW USERS.

Again, if I'm wrong with any of this information, I will stand corrected.

Just because you have yet to have an issue does not mean you will never have it, nor does it mean that such issues do not exist. I have never seen a million dollars. But I happen to believe that a million dollars exists.

Crazy, I know.

That being said, I still firmly believe that extended partitions should only be used in an AS NEEDED basis. If you don't need your drive partitioned into many separate partitions, why would you do so? There's no point, no advantage, no purpose. It doesn't help with anything except what it was originally designed for: To break out of the max primary partition limit.

It would be like installing Windows, BeOS, Linux, Unix, Safari and OS2/Warp on one computer, and only ever booting into Windows.

Just because you can, doesn't mean you should.

Cheers,
Ghost
 
Old 12-23-2007, 07:12 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
My intention of continuing with the discussion is purely for contributing our knowledge to the subject of extended partitions.

#1 Confusing to the users - This is personal experience. Linux before 2.6.20 supports 63 partitions in a Pata disk and 15 partitions in a SCSI/Sata/USB disk. The kernels later than 2.6.20 are trying to standardise on 15 partitions on all disks regardless of its type. Using extended partition with logical partitions is a fundamental feature of Linux as explained below.

#2 not always functional - My knowledge of Red Hat went started from RH9 and the oldest kernel I installed is 2.2.20. Ever since I entered Linux it has been supporting 256 devices of Pata and SCSI/Sata hard disk devices. The 4 Pata disks hda, hdb, hdc and hdd each with 64 devices (64 partitions plus the whole disk name) make up the 256 devices. The same 256 devices for SCSI/Sata/USB is achieved via 16 hard disks each with 16 devices (15 partitions plus the whole disk name). Linux already reserves the major and minor number for these devices and so all logical partitions inside an extended partitions are merely standard facilities in every Linux since I started to learn it 3.5 years ago. To hint some of these standard facilities not functional, without evidence, is to bring the Linux system into disrepute.

Here is an example from a user asking information to resize his RAID
Code:
    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       33        2      active sync   /dev/sdc1
       3       8       49        3      active sync   /dev/sdd1
It shows that Linux has reserves the major number 8 and minor number 1 for /dev/sda1, Major 8 Minor 2 is sda2 etc to Major 8 Minor 15 for sda15. The next inline Major 8 Minor 16 is for /dev/sdb, Major 8 Minor 17 is for /dev/sdb1 etc. The major and minor system enables Linux to mount the right device whenever a correct device name is specified. The full list is shown whenever a user type this command in the terminal
Code:
ls -l /dev
It is therefore a serious matter to suggest the extended partition and its logical partitions will not always functional, as it undermine the very concept of why Linux can mount a hard disk partition.

#3 It's not necessary - This is a matter of personal usage of an operating system. By the way there are only 256 hard disk block devices and not 256 billions partitions.

#4 due to the boot sector limits, so again, it's better to have 2 drives (one for each OS) - This is a clear misconception. Every Fat16, Fat32, NTFS, Ext2/3 and Reiserfs partition when created will have its first track set aside and reserved permanently as the boot sector. If a user uses the full allocation of 15 partitions in a hard disk he/she can store 15 different boot loaders, one in each partition's reserved boot sector. As far as Linux is concerned any boot loader from any distro residing in any partition can be nominated to take over the MBR to carry out multi-booting. If one finds it's better to have two drives (one for each OS) that is his/her personal choice but saying it is a matter of boot sector limits would be to misinform others.

#5 fdisk /mbr will not resolve an issue with an extended partition - Need I say more? I wrote in Post #5
Quote:
Only M$ systems, Solaris and most of the BSD need to be booted from a primary
"fdisk /mbr" is a Dos command and it can only fix the MBR in a primary partition. A stand-alone MS system cannot be booted from a logical partition. Non-stand-alone MS system can if another MS boot loader is available from another MS system in a primary partition but in such a case the "fdisk /mbr" will fix that primary. "fdisk /mbr" is to fix the MBR of a primary and has never been intended for use on a logical partition.

#6 if you have a sector issue in a logical drive/extended partition, you lose it all, not just the one logical drive - This is essentially an understanding issue of how logical partitions work in an extended partition. Each logical partition carries the hard disk address of the next logical partition down the line and the whole set must be in a continuous chain and cannot be broken. Removing one in the middle will cause everyone after the deleted partition to shift one position upward. This phenomenon can be witnessed visually if one uses the cfdisk terminal program in Linux. Thus if no logical partition is not deleted the original set of logicals will remain intact. If one must delete a middle partition just follow the rule to update the affected partition by reduce their partition number by one to take account that they have to be shifted one position upward automatically by the operating system.

#7 Not all partitioning programs handle extended partitions the same way - This is not entirely true. The very fabric of a PC user able to cross different platforms of using different operating systems co-existing inside a hard disk depends on every system complying with the common standard established by M$. A Linux or Solaris partition is of course foreign to a MS Windows but it will show up as primary or logical in its disk management program, although Vista is actually starting to every partition, inculuding logicals, primary. Linux has to coexist with all other operating systems thus its partitioning software is the the most versatile and flexible.

Partition of a hard disk is just working on 16 bytes per primary and there are no more than 64 bytes in the partition. Everything about partitioning is reversible as long as the partition is not overwritten and acopy of the partition table is kept, as I have rebuilt many hard disks from scratch with a maximum of 63 partitions after nuking away the partition table. Where supported a partition from one OS can be mounted in another for read write purpose. Thus it is essential that all PC operating systems are using the same protocol on primary and logical partitions in a hard disk.

The above is not meant to win an argument but to correct what I regard as misunderstanding. I could be wrong too so other may like to contribute if there are mistakes. Personal opinions are immaterial but the technical details and standards cannot be argued. They exist regardless one uses them or not.
 
Old 12-23-2007, 08:59 PM   #12
Lord Ghost
Member
 
Registered: Jul 2003
Posts: 68

Rep: Reputation: 15
Okay Saikee. I'm done debating. I've spoken from experience, and you want to say "oh no, that's not true".

Fine.

It could very well be that things are completely different from when I had problems with it in the past.

But let me point out a few things, okay?

Quote:
#1 Confusing to the users - This is personal experience.
No, professional experience. I deal with new users all the time. I build computers for them. Fix their mistakes. Teach them how to use their computer. So if you're going to call me a liar, at least get the grammar correct. It's PROFESSIONAL not PERSONAL. Okay?

Quote:
#2 not always functional - My knowledge of Red Hat went started from RH9
Yeah, RH9? I think that's when I STOPPED using Red Hat because it was getting too bloated. So, yeah, my accounts of issues stem from further in the past. Like I said, it's been a long time since I've bothered with an extended partition...because I've had no NEED to do so.

Quote:
#3 It's not necessary - This is a matter of personal usage of an operating system.
A matter of personal usage...hmmm...so, if I poll the general population of computer users...do you think that the MAJORITY would use extended partitions? No? But why not? Oh yeah, because they only have one operating system on their computer, and it's NOT NECESSARY. Why am I having to repeat myself to you?

Quote:
#4 due to the boot sector limits, so again, it's better to have 2 drives (one for each OS) - This is a clear misconception.
This was actually a clear typo on my behalf. I was attempting to express the 1024 cylinder limit for BIOS bootable drives, this can especially be an issue when using an extended partition (due to the confusion of how it sets up, and the confusion of drives within sections on a hard drive and the difficulty new users have in dealing with these things.)

Quote:
"fdisk /mbr" is a Dos command and it can only fix the MBR in a primary partition.
Most people switching to Linux are semi to very knowledgeable in Windows. When something fails, and they can't boot...they fall back on what they know. I've seen this happen time and time again. Ergo, I brought up this issue.

Quote:
If one must delete a middle partition just follow the rule to update the affected partition by reduce their partition number by one to take account that they have to be shifted one position upward automatically by the operating system.
Should be a piece of cake for a new user...I'll be sure to include that in my teachings for the future. (that's sarcasm by the way)

Quote:
#7 Not all partitioning programs handle extended partitions the same way - This is not entirely true.
If it's true, it's true. It can't be partly true. It's one statement.

FFS dude, everything you're spouting off is advanced user level stuff.

Which, ironically, kinda makes the topic, EXTENDED PARTITIONS a fairly advanced topic huh?

Maybe...not something you wanna encourage a new user to use?

Hmmm...

Maybe exactly what I tried to do?

My point is, unless it's NECESSARY, keep things simple. Primary partitions work fine. You apparently disagree and feel that everyone should be encouraged to play around with extended partitions.

COOL!

Tell ya what, you spout off whatever you wanna spout, and I'll go have a very Merry Christmas with my wife.

Peace.

Cheers,
Ghost
 
Old 12-24-2007, 02:27 AM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
If you deal only with PC users who have to pay you to build computers for them then it is true that I am wasting my time to explain the extended partition which was invented in Dos era.

In your case stick to simple primaries is best.
 
Old 12-24-2007, 08:09 AM   #14
Lord Ghost
Member
 
Registered: Jul 2003
Posts: 68

Rep: Reputation: 15
Wow, what an elitist prick way of saying, "I'm much more advanced than you..."

Which is probably true. I'm not an engineer who forgets that Linux isn't just for administrators anymore. I'm the one who's converting people to it everyday, instead of sitting at the lunchroom pushing up his glasses and explaining how "simple" it is to compile your own kernel.

So, please keep that in mind for future conversations.

Happy Christmas.

Cheers,
Ghost
 
Old 12-24-2007, 08:42 AM   #15
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Quote:
everything you're spouting off is advanced user level stuff.
Quote:
My point is, unless it's NECESSARY, keep things simple. Primary partitions work fine
If you regard extended partition is advanced user stuff and wish to work only with primaries it is your choice. Nobody can disagree with you or deny your rights.
 
  


Reply

Tags
bios, drive, extended, logical, numbering, partition, primary, sata, special



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
Help me avoid ever losing data again Z038 Linux - General 12 10-09-2006 02:32 AM
Repartitionning without losing data mimithebrain Linux - General 6 10-22-2005 04:38 PM
Repartitioning without losing data Cdzin Slackware 4 01-30-2005 08:27 PM
'Losing' installed programs in YAST bizshop Linux - Software 3 12-19-2004 09:58 AM
Repartitioning Without Damaging Data Cr4wford Linux - Hardware 5 11-02-2003 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 05:20 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
Open Source Consulting | Domain Registration