[opensuse] How to re-shuffle disk partitions
This is not a question about what tool to use, but about how to avoid a major screw-up. On a laptop I have an OpenSuse 11.3 with the disk configured thus: Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x94e494e4 Device Boot Start End Blocks Id System /dev/sda1 1 1275 10241406 7 HPFS/NTFS /dev/sda2 1276 2530 10080787+ 7 HPFS/NTFS /dev/sda3 2551 9729 57665317+ f W95 Ext'd (LBA) /dev/sda4 * 2531 2550 160650 83 Linux /dev/sda5 2846 9729 55295698+ 8e Linux LVM /dev/sda6 2558 2836 2241036 83 Linux /dev/sda7 2837 2845 72261 82 Linux swap /dev/sda8 2551 2557 56164+ 82 Linux swap Partition table entries are not in disk order Please not that last line! This was originally a dual boot machine, but when I asked when was the last time you booted into Windows I was met with the kind of glassy stare you expect from a deer caught in your headlights. DUH! So C: (/dev/sda1) and D: (/dev/sda2) go. Maybe make /dev/sda1 into /boot and some swap? In an ideal world .... * I'd drag /dev/sda4 (/boot) to the beginning of the disk * I'd drag /dev/sd7 and /dev/sd8 to follow it as swap and merge them * I would somehow expand the LVM to use the space left over in C: and D: But my problem is what will happen to the naming/numbering? My concern is that everything else gets re-numbered. In that ideal world, I suppose, a /etc/fstab that exclusively uses uuid might be immune to a renaming of the partitions in /dev/sd? terms. But that's not what I've got with this client. I'm hesitant to take a step here lest I end up with an unbootable system. What do the Disk Layout Gurus advise? [And yes, in a perfect world we would be running Grub2 and all this could have been put in a LVM and the Windows stuff could have been a virtual machine and none of this would be a problem since LVM is much smarter about naming "partitions". But ... ] -- Doubt is not a pleasant condition, but certainty is absurd. -- Voltaire -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 21 Apr 2011 23:43:55 Anton Aylward wrote:
[...]
In that ideal world, I suppose, a /etc/fstab that exclusively uses uuid might be immune to a renaming of the partitions in /dev/sd? terms. But that's not what I've got with this client.
You could always recreate /etc/fstab to use the UUID's or labels and test that it still boots OK and accesses all the partitions *before* moving anything (with a backup copy of the orignal first, of course). -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
So now I have the system un-Hosed and stable, I look to the next part. I have # fdisk -l /dev/sda Device Boot Start End Blocks Id System /dev/sda1 * 1 26 206848 83 Linux /dev/sda2 27 156 1044225 82 Linux swap /dev/sda3 2551 9729 57665317+ f W95 Ext'd (LBA) /dev/sda6 2558 2836 2241036 83 Linux /dev/sda5 2846 9729 55295698+ 8e Linux LVM sda1 - /boot sda2 - swap sda6 - / I plan to close up the gap by putting in /dev/sda4 from 157 too 300 and moving / there. In other word, presently there is CURRENTLY Primary sda1 /boot 202 MB Primary sda2 SWAP 1019.75 MB --- unallocated --- 18.34 GB Secondary sda3 --- unallocated --- 54.94 MB sda6 / 2.14 GB --- unallocated --- 70.63 MB sda5 LVM 52.73 GB Now in an ideal world, openSuse would have adopted Grub2 a long time back (what's holding it up?) and thus be able to boot from LVM and the whole disk would be LVM and none of this nonsense with shuffling partitions would arise! In a next to ideal world gparted would be able to do all the Partition Magic can do and more and shuffle partitions and grow them regardless of contents. But this is here and now. What I need to do is to create a partition - sda4 - in that 18G unallocated gap up close to sda2 and move what is presently in sda6 into it, update grub and fstab. That leaves me with two unallocated areas, one about 16GB and one of about 2.26 GB. In a better world, I'd be able to expand the front-end of that secondary partition to eat up 16 GB and expand the front end of the LVM partition to eat up the resulting 18 GB. I wish! But what to do really? Unfortunately moving the whole lot off and reformatting the disk isn't practical. -- A nation or civilization that continues to produce soft-minded men purchases its own spiritual death on an installment plan. --Martin Luther King, Jr. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/22 15:14 (GMT-0400) Anton Aylward composed:
So now I have the system un-Hosed and stable, I look to the next part.
I have
# fdisk -l /dev/sda
Device Boot Start End Blocks Id System /dev/sda1 * 1 26 206848 83 Linux /dev/sda2 27 156 1044225 82 Linux swap
/dev/sda3 2551 9729 57665317+ f W95 Ext'd (LBA)
/dev/sda6 2558 2836 2241036 83 Linux
/dev/sda5 2846 9729 55295698+ 8e Linux LVM
Lord only knows why any partitioner made the 2558 partition sda6 and the 2846 sda5. The only logical way to name that arrangement is the reverse, but Linux partitioners aren't afraid to use illogic.
sda1 - /boot sda2 - swap sda6 - /
I plan to close up the gap by putting in /dev/sda4 from 157 too 300 and moving / there.
A partitioner that isn't retarded will already show sda beginning on either 157, or on 2558, either way showing the whole space from 157-2557 as a contiguous block. A retarded one should nevertheless be able to put it either on 157 or 2558, leaving the whole 157-2557 chunk as available to either append to the start of the extended, or use as a 4th primary, or even divide up between primary #4 and logical space. The only reason to pin sda3 to 2551 would be if Grub was installed there, and you needed it to stay installed there, and you don't. Except for when Grub code is located in the extended's boot sector, the extended is nothing but a location for a partition table entry pointing to the start of the first logical. That can readily be moved to the first logical, or the first free sector following the last primary before the start of space occupied by logicals. IOW, there most likely isn't really any gap between sda6 and sda3 now, unless there used to be a need for Grub code in the extended that is not currently needed to be there. With the partitioner I use, if that disk was here, I'd just shove sda6 back to 157, and enlarge it to whatever size desired, probably half the space from 157-2845. Then I'd add another of same size to use for multiboot to openSUSE-next, allowing to test drive the next release without disturbing what already works. LVM could be left alone. Or, if resizing LVM is an option (I have no idea - I've only ever used LVM once, and have no plans to use it in the foreseeable future), make two / partitions in the free space from 157-2845 using less than all of if, then apply the remainder to the front of sda5. The result with my partitioner would be / on sda5, another / on sda6, LVM on sda7, and no sda4.
In other word, presently there is CURRENTLY
Primary sda1 /boot 202 MB Primary sda2 SWAP 1019.75 MB --- unallocated --- 18.34 GB Secondary sda3 --- unallocated --- 54.94 MB sda6 / 2.14 GB --- unallocated --- 70.63 MB sda5 LVM 52.73 GB
Now in an ideal world, openSuse would have adopted Grub2 a long time back (what's holding it up?)
The holdup is it is far from ready for use by normal humans. Much about it is very very very different from Grub1. Only its devs and a tiny handful of dedicated followers know enough about it to actually use it. Its documentation is hopelessly incomplete. I don't remember seeing any estimate of how complete it is, but I have to guess 10% complete would be an optimistic overstatement.
and thus be able to boot from LVM and the whole disk would be LVM and none of this nonsense with shuffling partitions would arise!
Part of the nonsense is artificial freespace division and arbitrary placement of sda3.
In a next to ideal world gparted would be able to do all the Partition Magic can do and more and shuffle partitions and grow them regardless of contents.
Parted Magic is supposed to do what Partition Magic can do and more. I don't use either. I use DFSee, which is not FOSS, but comes as a package of executables that produce identical results whether you run it from OS/2, DOS (e.g. floppy or CD), Windows, Mac, or Linux. http://lmgtfy.com/?q=dfsee
But this is here and now.
What I need to do is to create a partition - sda4 - in that 18G unallocated gap up close to sda2 and move what is presently in sda6 into it, update grub and fstab.
Not Grub, just menu.lst & fstab.
That leaves me with two unallocated areas, one about 16GB and one of about 2.26 GB.
As stated above, you really only have one unallocated area, 157-2557.
In a better world, I'd be able to expand the front-end of that secondary partition to eat up 16 GB and expand the front end of the LVM partition to eat up the resulting 18 GB.
I wish!
But what to do really?
Find out whether one LVM can be grown into preceeding freespace before doing or deciding anything else. If it can't, investigate the ramifications of creating an adjacent LVM, and whether that can be functionally merged with the existing one before deciding anything else.
Unfortunately moving the whole lot off and reformatting the disk isn't practical.
I wouldn't be afraid to do that myself, but it's not something I'd recommend to anyone who doesn't already have everything backed up in a fashion that makes restoration a reasonable process. Of course, if you do have that backup, why not just wipe everything from 157-up and restore from backup after creating the partition arrangement you want? -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata said the following on 04/22/2011 04:28 PM:
That leaves me with two unallocated areas, one about 16GB and one of about 2.26 GB. As stated above, you really only have one unallocated area, 157-2557.
If you go back to the beginning of this thread where there was the dual boot configuration, and compare it to the 'now' you'll see a) the space occupied by the C: and D: is now occupied by the very much smaller /boot and swap, leaving a large unoccupied areas b) the root on /dev/sda6 had small swap partitions on either side: /dev/sda8 2551 2557 56164+ 82 Linux swap /dev/sda6 2558 2836 2241036 83 Linux /dev/sda7 2837 2845 72261 82 Linux swap So with those gone there are current THREE unallocated areas. The reason I say this is that the old sda{867} were in the EXTENDED partition. You are correct in that there are two numerical spans, but I think there would be a problem if I tried creating a file system that covered 157-2557. This is why I want to move root - /dev/sda6 - out of the extended partition, and do the shuffling of boundaries. Lets do this in parts. I can create a new primary partition starting at 157 in which to put the root. How can I copy root? I can't simply copy using rsync because of /dev and /proc and /sys .... I'll need to patch up fstab and grub (menu.lst as you say). That will leave me with TWO unallocated areas, one in the extended partition. Are you saying that I can just edit the partition table arbitrarily to say where the extended partition begins? Alter the 2551 to 2845. Won't that break things? -- Where we cannot invent, we may at least improve. - Charles Caleb Colton -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Are you saying that I can just edit the partition table arbitrarily to say where the extended partition begins? Alter the 2551 to 2845. Won't that break DFSee, IIRC like Partition Magic, and if so probably like Parted Magic, does not arbitrarily divide up a contiguous block of space between a primary and a logical like what you actually have now but that fdisk claims is a bunch if bits and pieces delineated by partitions that no longer exist. So, DFSee would not directly break anything by putting either a logical or a primary at
On 2011/04/22 17:03 (GMT-0400) Anton Aylward composed: 157. Indirectly fstab entries or menu.lst entries could be broken by having partition names in logical disk order, but those could be easily fixed. Also, the results would be out of sync with what the kernel thinks it knows about the HD until rebooting, or maybe issuing some kind of re-sync command I don't know anything about. With what you have, if I wanted a 5G logical to begin at 157, I would issue this command: cr log ext2 5000 -f:3 -f:3 refers to the freespace that DFSee assigns ID #3, because it directly follows sda1 as ID #1 and sda2 as ID #2. cr means create a partition. log means I want a partition "contained within" the extended. ext2 says I want it to be type 0x83. 5000 is how many MB I want it to be. Without any -e: parameter, it assumes I want it to start at the beginning of the selected freespace area. If I wanted a primary in that same location, the command would be similar: cr pri ext2 5000 -f:3 DFSee has menus that can do the same thing, but I only use its menus for things I can't remember how to do otherwise. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/22 17:03 (GMT-0400) Anton Aylward composed:
Lets do this in parts. I can create a new primary partition starting at 157 in which to put the root. How can I copy root? I can't simply copy using rsync because of /dev and /proc and /sys ....
Do it booted from a live CD, but before rebooting from the HD, run tune2fs -U random -L yourchoiceofpartitionlable on one of those root partitions if you've cloned it with dd or equivalent. In any event, give it a label, and use labels in fstab and menu.lst instead of device names or those awful long /dev/disk/by-gobbledegookyaddayadda names. I wouldn't make any of the new partitions a primary if it was me actually doing it, but you may be better off in the long run if you do. What would really be nice though is to move the extended to the 4th MBR table slot, making it sda4, and allowing device names to match the logical order of the partitions on disk. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata said the following on 04/22/2011 06:29 PM:
What would really be nice though is to move the extended to the 4th MBR table slot, making it sda4, and allowing device names to match the logical order of the partitions on disk.
Yes, that would be aesthetically pleasing. How to do that with tools like [s]fdisk and [g]parted ? -- "Opportunity is missed by most people because it is dressed in overalls and looks like work." -- Thomas A. Edison -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/22 19:12 (GMT-0400) Anton Aylward composed:
Felix Miata said the following on 04/22/2011 06:29 PM:
What would really be nice though is to move the extended to the 4th MBR table slot, making it sda4, and allowing device names to match the logical order of the partitions on disk.
Yes, that would be aesthetically pleasing.
Also easier for one's brain to manage. If you don't have the whole order flipped backwards, 6 belongs after 5, not before. ;-)
How to do that with tools like [s]fdisk and [g]parted ?
I think using fdisk that the f (fix partition order) command would move the sda4 label to the extended and the sda3 label to your newest primary, the "relocated" /. I haven't used the others enough to have any ideas. FWIW, http://fm.no-ip.com/Tmp/Dfsee/gx620L01.txt is both DFSee reports and fdisk -l report for a brand new 1.5T HD I just set up to use in a puter under my TV. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata said the following on 04/22/2011 06:29 PM:
On 2011/04/22 17:03 (GMT-0400) Anton Aylward composed:
Lets do this in parts. I can create a new primary partition starting at 157 in which to put the root. How can I copy root? I can't simply copy using rsync because of /dev and /proc and /sys ....
Do it booted from a live CD,
Check :-)
but before rebooting from the HD, run tune2fs -U random -L yourchoiceofpartitionlable on one of those root partitions if you've cloned it with dd or equivalent. In any event, give it a label, and use labels in fstab and menu.lst instead of device names or those awful long /dev/disk/by-gobbledegookyaddayadda names.
Good idea. Easier to type as well. BootFS RootFS hey! Easy to confuse ... OBTW: How do I give a short label to a swap ? It is currently /dev/disk/by-id/ata-IC25N080ATMR04-0_MRG41YK4J5NL5H-part2 in the menu.lst -- Everything comes to him who hustles while he waits. Thomas A. Edison -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/23 10:20 (GMT-0400) Anton Aylward composed:
Felix Miata said:
but before rebooting from the HD, run tune2fs -U random -L yourchoiceofpartitionlable on one of those root partitions if you've cloned it with dd or equivalent. In any event, give it a label, and use labels in fstab and menu.lst instead of device names or those awful long /dev/disk/by-gobbledegookyaddayadda names.
Good idea. Easier to type as well. BootFS RootFS
hey! Easy to confuse ...
p01boot p03os114 or for those who routinely have multiple HDs: HDnick01boot HDnick03os114
OBTW: How do I give a short label to a swap ? It is currently /dev/disk/by-id/ata-IC25N080ATMR04-0_MRG41YK4J5NL5H-part2 in the menu.lst
Did you know mkswap has a man page? :-) swapoff -a mkswap -L p02swapper /dev/sda2 (edit fstab) swapon -a -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There are all manner of saying about the horrible consequences when you get what you ask for. The thread that unravels .. a little knowledge. So now he's got rid of the Windows partitions he's asking for more. The man page on fdisk warns fdisk doesn't understand GUID Partition Table (GPT) and it is not designed for large partitions. In particular case use more advanced GNU parted(8). So he did. OUCH! It also says fdisk is a buggy program that does fuzzy things - usually it happens to produce reasonable results. Its single advantage is that it has some support for BSD disk labels and other non-DOS partition tables. Avoid it if you can. Well it seems the current state of the partition table arose from the initial use of fdisk. Parted gives off results. In places it seems to want to work in megabytes and not sector or cylinders, but it can report great detail. This is what it gives in text-mode (parted) print free Model: ATA IC25N080ATMR04-0 (scsi) Disk /dev/sda: 80.0GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 32.3kB 1049kB 1016kB Free Space 1 1049kB 213MB 212MB primary ext3 boot, type=83 213MB 214MB 996kB Free Space 2 214MB 1283MB 1069MB primary linux-swap(v1) type=82 3 1283MB 2361MB 1078MB primary ext3 type=83 2361MB 21.0GB 18.6GB Free Space 4 21.0GB 80.0GB 59.0GB extended lba, type=0f 21.0GB 23.4GB 2426MB Free Space 5 23.4GB 80.0GB 56.6GB logical lvm, type=8e 80.0GB 80.0GB 2613kB Free Space As in "Oh Look At All That Free Space Wasted" and "Can't I move 1, 2 and 3 along?" and "Parted says I can" Which gets back to parted and its funny ideas It says move partition start end Move partition so that it begins at start and ends at end. Note: move never changes the minor number and unit unit Set unit as the unit to use when displaying locations and sizes, and for interpreting those given by the user when not suffixed with an explicit unit. unit can be one of "s" (sectors), "B" (bytes), "kB", "MB", "GB", "TB", "%" (percentage of device size), "cyl" (cylinders), "chs" (cylinders, heads, sectors), or "compact" (megabytes for input, and a human-friendly form for output). Which eventually gives (parted) print free Model: ATA IC25N080ATMR04-0 (scsi) Disk /dev/sda: 156301488s Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 63s 2047s 1985s Free Space 1 2048s 415743s 413696s primary ext3 boot, type=83 415744s 417689s 1946s Free Space 2 417690s 2506139s 2088450s primary linux-swap(v1) type=82 3 2506140s 4610654s 2104515s primary ext3 type=83 4610655s 40965749s 36355095s Free Space 4 40965750s 156296384s 115330635s extended lba, type=0f 40965813s 45704924s 4739112s Free Space 5 45704988s 156296384s 110591397s logical lvm, type=8e 156296385s 156301487s 5103s Free Space (sorry about the wrap) While all this makes sense I'm reluctant to try parted's "move" on a production system without some reassurance. Are there margins I need to allow for? Can I really do a unit s move 1 63 39384 ? Perhaps I need to convert the ext3 to ext2 first ??? I found this http://www.hermann-uwe.de/blog/resizing-ext3-partitions-with-parted Any comments or advice? -- The fact is that my native land is a prey to barbarism, that in it men's only God is their belly, that they live only for the present, and that the richer a man is the holier he is held to be. -- Saint Jerome, Letter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 4/25/2011 8:47 AM, Anton Aylward wrote:
There are all manner of saying about the horrible consequences when you get what you ask for. The thread that unravels .. a little knowledge. So now he's got rid of the Windows partitions he's asking for more.
The man page on fdisk warns
fdisk doesn't understand GUID Partition Table (GPT) and it is not designed for large partitions. In particular case use more advanced GNU parted(8).
So he did. OUCH!
It also says
fdisk is a buggy program that does fuzzy things - usually it happens to produce reasonable results. Its single advantage is that it has some support for BSD disk labels and other non-DOS partition tables. Avoid it if you can.
Well it seems the current state of the partition table arose from the initial use of fdisk.
Parted gives off results. In places it seems to want to work in megabytes and not sector or cylinders, but it can report great detail. This is what it gives in text-mode
(parted) print free Model: ATA IC25N080ATMR04-0 (scsi) Disk /dev/sda: 80.0GB Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags 32.3kB 1049kB 1016kB Free Space 1 1049kB 213MB 212MB primary ext3 boot, type=83 213MB 214MB 996kB Free Space 2 214MB 1283MB 1069MB primary linux-swap(v1) type=82 3 1283MB 2361MB 1078MB primary ext3 type=83 2361MB 21.0GB 18.6GB Free Space 4 21.0GB 80.0GB 59.0GB extended lba, type=0f 21.0GB 23.4GB 2426MB Free Space 5 23.4GB 80.0GB 56.6GB logical lvm, type=8e 80.0GB 80.0GB 2613kB Free Space
As in "Oh Look At All That Free Space Wasted" and "Can't I move 1, 2 and 3 along?" and "Parted says I can"
Which gets back to parted and its funny ideas
It says move partition start end Move partition so that it begins at start and ends at end. Note: move never changes the minor number
and
unit unit Set unit as the unit to use when displaying locations and sizes, and for interpreting those given by the user when not suffixed with an explicit unit. unit can be one of "s" (sectors), "B" (bytes), "kB", "MB", "GB", "TB", "%" (percentage of device size), "cyl" (cylinders), "chs" (cylinders, heads, sectors), or "compact" (megabytes for input, and a human-friendly form for output).
Which eventually gives
(parted) print free Model: ATA IC25N080ATMR04-0 (scsi) Disk /dev/sda: 156301488s Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags 63s 2047s 1985s Free Space 1 2048s 415743s 413696s primary ext3 boot, type=83 415744s 417689s 1946s Free Space 2 417690s 2506139s 2088450s primary linux-swap(v1) type=82 3 2506140s 4610654s 2104515s primary ext3 type=83 4610655s 40965749s 36355095s Free Space 4 40965750s 156296384s 115330635s extended lba, type=0f 40965813s 45704924s 4739112s Free Space 5 45704988s 156296384s 110591397s logical lvm, type=8e 156296385s 156301487s 5103s Free Space
(sorry about the wrap)
While all this makes sense I'm reluctant to try parted's "move" on a production system without some reassurance. Are there margins I need to allow for?
Can I really do a unit s move 1 63 39384
? Perhaps I need to convert the ext3 to ext2 first ???
I found this http://www.hermann-uwe.de/blog/resizing-ext3-partitions-with-parted
Any comments or advice?
"What happened when you tried it?" Hint, a free ramdisk (file-backed loop device), and a few minutes and you can answer that and many other questions that the manual leaves too ambiguous, and you won't have to rely on anyone elses word or understanding or even the correctness or completeness of the manual. -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Brian K. White said the following on 04/25/2011 12:43 PM:
"What happened when you tried it?"
Parted does not permit moving an ext2/3 partition if the source and destination partition overlap. So, I thought, copy to a new partition, erase. copy back. Well parted copy doesn't work quite as advertised. It seems to copy and it thinks it has made a ext3 copy but when I come to mount to check, it isn't really any recognisable fs. However dd | od or strings and it looks like what it should be. DUH? OK, do it the long way ... -- The improvement of our way of life is more important than the spreading of it. If we make it satisfactory enough, it will spread automatically. If we do not, no strength of arms can permanently oppose it. - Charles A. Lindbergh -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/21 10:13 (GMT-0400) Anton Aylward composed:
This is not a question about what tool to use, but about how to avoid a major screw-up.
On a laptop I have an OpenSuse 11.3 with the disk configured thus:
Device Boot Start End Blocks Id System /dev/sda1 1 1275 10241406 7 HPFS/NTFS /dev/sda2 1276 2530 10080787+ 7 HPFS/NTFS /dev/sda3 2551 9729 57665317+ f W95 Ext'd (LBA) /dev/sda4 * 2531 2550 160650 83 Linux /dev/sda5 2846 9729 55295698+ 8e Linux LVM /dev/sda6 2558 2836 2241036 83 Linux /dev/sda7 2837 2845 72261 82 Linux swap /dev/sda8 2551 2557 56164+ 82 Linux swap
Partition table entries are not in disk order
That's usually because the first logical partition got created before the last primary partition got created. The order of original creation usually determines which table entry slot gets used for the extended. They could be rearranged into disk order, but doing that requires additional skillful procedures to be performed in a certain sequence to avoid an unbootable system.
Please not that last line!
You mean s/not/note/? What about it? A 2nd swap partition?
This was originally a dual boot machine, but when I asked when was the last time you booted into Windows I was met with the kind of glassy stare you expect from a deer caught in your headlights. DUH!
So C: (/dev/sda1) and D: (/dev/sda2) go. Maybe make /dev/sda1 into /boot and some swap? In an ideal world ....
* I'd drag /dev/sda4 (/boot) to the beginning of the disk * I'd drag /dev/sd7 and /dev/sd8 to follow it as swap and merge them * I would somehow expand the LVM to use the space left over in C: and D:
But my problem is what will happen to the naming/numbering?
My concern is that everything else gets re-numbered.
The names sda[1-4] actually come from the positions of the partition entries in the MBR's partition table. You can delete sda1 & sda2 without affecting any other names.
In that ideal world, I suppose, a /etc/fstab that exclusively uses uuid might be immune to a renaming of the partitions in /dev/sd? terms. But that's not what I've got with this client.
I'm hesitant to take a step here lest I end up with an unbootable system. What do the Disk Layout Gurus advise?
[And yes, in a perfect world we would be running Grub2 and all this could have been put in a LVM and the Windows stuff could have been a virtual machine and none of this would be a problem since LVM is much smarter about naming "partitions". But ...
1-Delete 1 & 2. 2a-create a 160650 block sda1 that could function as a replacement /boot 3a-create another LVM sda2 with remainder & adjust fstab accordingly; or 2b-create a swap of whatever size you deem sufficient as an exclusive swap partition 3b-create another LVM sda2 with remainder 4b-umount and delete sda7 & sda8, grow sda6 into the vacated space, adjust fstab accordingly Those familiar with Grub's command interface and mkfs could easily go the 2a route, possibly before deleting sda2, copy the content of sda4 to it, install Grub to it, adjust fstab accordingly, and reboot with sda1 as the new /boot before proceeding to delete sda2 and sda4 to create a new swap sda2 and LVM sda4 in the space vacated by sda2 and sda4. Or, grow sda5 into all the space vacated by sda2 & sda4 - I think, since I'm unfamiliar with LVM niceties - and leave swap at the end of the disk. The latter should eliminate the out of disk order messages running fdisk -l, since there would only be one primary hosting a filesystem partition directly before the start of the extended. You'd then have either sda1, sda2, sda3, sda5, sda6.... or sda1, sda3, sda5, sda6.... depending on whether putting in the swap on sda2 or not. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata said the following on 21/04/2011 11:19 AM:
Those familiar with Grub's command interface and mkfs could easily go the 2a route, possibly before deleting sda2, copy the content of sda4 to it, install Grub to it, adjust fstab accordingly, and reboot with sda1 as the new /boot before proceeding to delete sda2 and sda4 to create a new swap sda2 and LVM sda4 in the space vacated by sda2 and sda4. Or, grow sda5 into all the space vacated by sda2 & sda4 - I think, since I'm unfamiliar with LVM niceties - and leave swap at the end of the disk. The latter should eliminate the out of disk order messages running fdisk -l, since there would only be one primary hosting a filesystem partition directly before the start of the extended. You'd then have either sda1, sda2, sda3, sda5, sda6.... or sda1, sda3, sda5, sda6.... depending on whether putting in the swap on sda2 or not.
I created /dev/sda2 as a new swap. Reboot. All went well. I created /dev/sda1 as a new /boot and rsync'd the contents of the old /boot across. Reboot. OK BUT ... well actually it was using the old partition to boot :-/ So I deleted the old /boot I'm HOSED The "DVD/Repair Installed System" verifies everything but gets hung up on a 'cannot change to Target system ....' Trying grub-install.unsupported from a live CD gives me an error saying there is no BIOS partition. I'm lost. And still hosed. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 22/04/11 14:17, Anton J Aylward wrote:
Felix Miata said the following on 21/04/2011 11:19 AM:
Those familiar with Grub's command interface and mkfs could easily go the 2a route, possibly before deleting sda2, copy the content of sda4 to it, install Grub to it, adjust fstab accordingly, and reboot with sda1 as the new /boot before proceeding to delete sda2 and sda4 to create a new swap sda2 and LVM sda4 in the space vacated by sda2 and sda4. Or, grow sda5 into all the space vacated by sda2 & sda4 - I think, since I'm unfamiliar with LVM niceties - and leave swap at the end of the disk. The latter should eliminate the out of disk order messages running fdisk -l, since there would only be one primary hosting a filesystem partition directly before the start of the extended. You'd then have either sda1, sda2, sda3, sda5, sda6.... or sda1, sda3, sda5, sda6.... depending on whether putting in the swap on sda2 or not.
I created /dev/sda2 as a new swap. Reboot. All went well. I created /dev/sda1 as a new /boot and rsync'd the contents of the old /boot across. Reboot. OK BUT ... well actually it was using the old partition to boot :-/ So I deleted the old /boot
I'm HOSED
The "DVD/Repair Installed System" verifies everything but gets hung up on a 'cannot change to Target system ....'
Trying grub-install.unsupported from a live CD gives me an error saying there is no BIOS partition.
I'm lost. And still hosed.
What did you have in your MBR? probably (hopefully) generic bootloader code? If so, and you've copied /boot properly, the solution might be as simple as designating the new /boot (/dev/sda1) as the only active boot partition. This can be done with fdisk for example (inside fdisk command is 'a' to toggle bootable flag). In any case post the new output from fdisk -l so we can understand what's gone on. Just go straight into the "rescue system" from the DVD boot menu and you'll get a working fdisk, no need to start the graphical installer. Tejas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Tejas Guruswamy said the following on 22/04/2011 9:24 AM:
On 22/04/11 14:17, Anton J Aylward wrote:
Felix Miata said the following on 21/04/2011 11:19 AM:
Those familiar with Grub's command interface and mkfs could easily go the 2a route, possibly before deleting sda2, copy the content of sda4 to it, install Grub to it, adjust fstab accordingly, and reboot with sda1 as the new /boot before proceeding to delete sda2 and sda4 to create a new swap sda2 and LVM sda4 in the space vacated by sda2 and sda4. Or, grow sda5 into all the space vacated by sda2 & sda4 - I think, since I'm unfamiliar with LVM niceties - and leave swap at the end of the disk. The latter should eliminate the out of disk order messages running fdisk -l, since there would only be one primary hosting a filesystem partition directly before the start of the extended. You'd then have either sda1, sda2, sda3, sda5, sda6.... or sda1, sda3, sda5, sda6.... depending on whether putting in the swap on sda2 or not.
I created /dev/sda2 as a new swap. Reboot. All went well. I created /dev/sda1 as a new /boot and rsync'd the contents of the old /boot across. Reboot. OK BUT ... well actually it was using the old partition to boot :-/ So I deleted the old /boot
I'm HOSED
The "DVD/Repair Installed System" verifies everything but gets hung up on a 'cannot change to Target system ....'
Trying grub-install.unsupported from a live CD gives me an error saying there is no BIOS partition.
I'm lost. And still hosed.
What did you have in your MBR? probably (hopefully) generic bootloader code?
Whatever the original openSuse install put there
If so, and you've copied /boot properly, the solution might be as simple as designating the new /boot (/dev/sda1) as the only active boot partition. This can be done with fdisk for example (inside fdisk command is 'a' to toggle bootable flag).
Yes, I did that. I think that is part of what hosed it.
In any case post the new output from fdisk -l so we can understand what's gone on.
Not possible - its HOSED
Just go straight into the "rescue system" from the DVD boot menu and you'll get a working fdisk, no need to start the graphical installer.
Yes, I tried that. see above. At the very least, I'm now of the opinion that the old grub had embedded strings that referred to the original partition settings for /boot and /root and that simply copying it from the old partition to the new will not work even if-and-when I get the MBR issue settled. Please take a look at what is in your /boot/grub/menu.lst and tell me if you think I'm right about this. This is a whole lot more complicated, I think, that the simple steps Felix proposed! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 22/04/11 14:59, Anton J Aylward wrote:
Tejas Guruswamy said the following on 22/04/2011 9:24 AM:
On 22/04/11 14:17, Anton J Aylward wrote:
I created /dev/sda2 as a new swap. Reboot. All went well. I created /dev/sda1 as a new /boot and rsync'd the contents of the old /boot across. Reboot. OK BUT ... well actually it was using the old partition to boot :-/ So I deleted the old /boot
I'm HOSED
The "DVD/Repair Installed System" verifies everything but gets hung up on a 'cannot change to Target system ....'
Trying grub-install.unsupported from a live CD gives me an error saying there is no BIOS partition.
I'm lost. And still hosed.
What did you have in your MBR? probably (hopefully) generic bootloader code?
Whatever the original openSuse install put there
If so, and you've copied /boot properly, the solution might be as simple as designating the new /boot (/dev/sda1) as the only active boot partition. This can be done with fdisk for example (inside fdisk command is 'a' to toggle bootable flag).
Yes, I did that. I think that is part of what hosed it.
In any case post the new output from fdisk -l so we can understand what's gone on.
Not possible - its HOSED
Of course its possible, no matter how bad the system is it doesn't affect booting off the DVD.
Just go straight into the "rescue system" from the DVD boot menu and you'll get a working fdisk, no need to start the graphical installer.
Yes, I tried that. see above.
Not sure you have. On the very first bootup menu, choose rescue, and you'll end up in a rescue console. Login as root, no password. Then run fdisk.
At the very least, I'm now of the opinion that the old grub had embedded strings that referred to the original partition settings for /boot and /root and that simply copying it from the old partition to the new will not work even if-and-when I get the MBR issue settled. Please take a look at what is in your /boot/grub/menu.lst and tell me if you think I'm right about this.
This is a whole lot more complicated, I think, that the simple steps Felix proposed!
Well of course, you've got to edit /boot/grub/menu.lst to point to the new partitions as Felix says. But you should be seeing signs that grub is being loaded before it errors out. Once that's the only error then its relatively simple to fix. Tejas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/22 09:59 (GMT-0400) Anton J Aylward composed:
This is a whole lot more complicated, I think, that the simple steps Felix proposed!
Actually the way I wrote so much and not in the form of an instruction list probably made it more confusing and look more complicated than it is, plus writing fstab where I was supposed to write menu.lst, and forgetting about setting sda1 active didn't help. I do a lot of cloning and moving things around, so much that things become second nature, and thus easily forgotten in the process of documenting. Leaving http://orgs.man.ac.uk/documentation/grub/grub_3.html#SEC9 out of my reply was bad too, but as you can see there, installing Grub really need not be that complicated a process. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata said the following on 04/22/2011 10:28 AM:
On 2011/04/22 09:59 (GMT-0400) Anton J Aylward composed:
This is a whole lot more complicated, I think, that the simple steps Felix proposed!
Actually the way I wrote so much and not in the form of an instruction list probably made it more confusing and look more complicated than it is, plus writing fstab where I was supposed to write menu.lst, and forgetting about setting sda1 active didn't help.
You're forgiven :-) No data was lost, a large part of that being die to the fact that all the real data was in LVM, which is pretty hard to scru-up een if you badly hose your partition table :-)
I do a lot of cloning and moving things around, so much that things become second nature, and thus easily forgotten in the process of documenting. Leaving http://orgs.man.ac.uk/documentation/grub/grub_3.html#SEC9 out of my reply was bad too, but as you can see there, installing Grub really need not be that complicated a process.
Now that I know I agree. :-) -- Three things are certain: Death, taxes, and lost data. Guess which has occurred. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anton J Aylward wrote:
Felix Miata said the following on 21/04/2011 11:19 AM:
Those familiar with Grub's command interface and mkfs could easily go the 2a route, possibly before deleting sda2, copy the content of sda4 to it, install Grub to it, adjust fstab accordingly, and reboot with sda1 as the new /boot before proceeding to delete sda2 and sda4 to create a new swap sda2 and LVM sda4 in the space vacated by sda2 and sda4. Or, grow sda5 into all the space vacated by sda2 & sda4 - I think, since I'm unfamiliar with LVM niceties - and leave swap at the end of the disk. The latter should eliminate the out of disk order messages running fdisk -l, since there would only be one primary hosting a filesystem partition directly before the start of the extended. You'd then have either sda1, sda2, sda3, sda5, sda6.... or sda1, sda3, sda5, sda6.... depending on whether putting in the swap on sda2 or not.
I created /dev/sda2 as a new swap. Reboot. All went well. I created /dev/sda1 as a new /boot and rsync'd the contents of the old /boot across. Reboot. OK BUT ... well actually it was using the old partition to boot :-/ So I deleted the old /boot
I'm HOSED
How about something along these lines: boot rescue system (knoppix, opensuse live, whatever) amend bootloader config to boot from sda1 if necessary re-install mbr make sda1 active reboot -- Per Jessen, Zürich (21.6°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/22 15:57 (GMT+0200) Per Jessen composed:
make sda1 active
Yowee!!! I forgot to say that too. :~( -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata said the following on 04/22/2011 11:01 AM:
On 2011/04/22 15:57 (GMT+0200) Per Jessen composed:
make sda1 active
Yowee!!! I forgot to say that too. :~(
You're forgiven :-) *THAT*, at least, I figured out for myself :-) -- Dear Lord: Please make my words sweet and tender, for tomorrow I may have to eat them. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/22 09:17 (GMT-0400) Anton J Aylward composed:
Felix Miata said:
Those familiar with Grub's command interface ... copy the content of sda4 to it, install Grub to it, adjust fstab accordingly
Oops! That was supposed to say also "adjust menu.lst accordingly". :-(
I created /dev/sda2 as a new swap. Reboot. All went well.
First? Why?
I created /dev/sda1 as a new /boot and rsync'd the contents of the old /boot across. Reboot. OK
Without adjusting fstab first? Without thinking about changing Grub config first?
BUT ... well actually it was using the old partition to boot :-/ So I deleted the old /boot
AFAIK, rsync copies files between systems, which is not where the part of Grub that begins the boot process lives.
I'm HOSED
The "DVD/Repair Installed System" verifies everything but gets hung up on a 'cannot change to Target system ....'
I've never used that function myself. When repair is necessary, I use the Grub shell.
Trying grub-install.unsupported from a live CD gives me an error saying there is no BIOS partition.
Grub-install assumes normalcy, which in repair mode you don't have.
I'm lost. And still hosed.
1-Boot a live CD. For this purpose, I always use Knoppix. 2-Start the Grub shell, thus # grub grub> 3-To ensure rsync did what it was supposed to do grub> find /boot/grub/stage1 (hd0,0) 4-Tell Grub this is what you want to be the root grub> root (hd0,0) Filesystem type is ext2fs, partition type 0x83 5-Install Grub grub> setup (hd0,0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal) Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal) Running "install /boot/grub/stage (hd0,0) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded Done. 6-Exit Grub grub> quit # All the above is in all the man page and howtos around. You still need to mount sda1 and replace occurrences of (hd0,2) with (hd0,0) in menu.lst. Then you should be unhosed, good to go. Note that now that you don't have a multiboot system any more, you could put Grub on the MBR instead of sda1. I'll leave that up to your reading of the man page and/or howtos should that be your choice, but it either way your boot process will look exactly the same to your eyes. The installed OS won't know any difference either. Before update time, /etc/grub.conf will need to be changed too to reflect the new home for Grub on sda1 (or sda) instead of sda4. Do not neglect to do this, unless you like being hosed by an update!!! -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata said the following on 04/22/2011 10:06 AM:
On 2011/04/22 09:17 (GMT-0400) Anton J Aylward composed:
Felix Miata said:
Those familiar with Grub's command interface ... copy the content of sda4 to it, install Grub to it, adjust fstab accordingly
Oops! That was supposed to say also "adjust menu.lst accordingly". :-(
THANKS! I *did* adjust the fstab at each step. It was not knowing about menu.lst that was the killer!
I created /dev/sda2 as a new swap. Reboot. All went well.
First? Why?
Just to check, before deleting to the other oddball swap in the LVM
I created /dev/sda1 as a new /boot and rsync'd the contents of the old /boot across. Reboot. OK
Without adjusting fstab first?
See above. I was obsessive about the fstab.
Without thinking about changing Grub config first?
See above.
BUT ... well actually it was using the old partition to boot :-/ So I deleted the old /boot
AFAIK, rsync copies files between systems, which is not where the part of Grub that begins the boot process lives.
Despite what I've managed to get working, I don't understand that comment.
I'm HOSED
The "DVD/Repair Installed System" verifies everything but gets hung up on a 'cannot change to Target system ....'
I've never used that function myself. When repair is necessary, I use the Grub shell.
Trying grub-install.unsupported from a live CD gives me an error saying there is no BIOS partition.
Grub-install assumes normalcy, which in repair mode you don't have.
And the error messages it gives are among the most unhelpful I've met!
I'm lost. And still hosed.
1-Boot a live CD. For this purpose, I always use Knoppix.
Knoppix is *very* reliable; boots on just about everything!
2-Start the Grub shell, thus
# grub grub>
3-To ensure rsync did what it was supposed to do
grub> find /boot/grub/stage1 (hd0,0)
4-Tell Grub this is what you want to be the root
grub> root (hd0,0) Filesystem type is ext2fs, partition type 0x83
5-Install Grub
grub> setup (hd0,0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal) Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal) Running "install /boot/grub/stage (hd0,0) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded Done.
6-Exit Grub grub> quit #
All the above is in all the man page and howtos around.
I found that and did that :-) But ... BuQQer! It still did not work! Close but not there.
You still need to mount sda1 and replace occurrences of (hd0,2) with (hd0,0) in menu.lst. Then you should be unhosed, good to go.
Actually it was (hd0,3) that needed replacing :-)
Note that now that you don't have a multiboot system any more, you could put Grub on the MBR instead of sda1. I'll leave that up to your reading of the man page and/or howtos should that be your choice, but it either way your boot process will look exactly the same to your eyes. The installed OS won't know any difference either.
Yup.
Before update time, /etc/grub.conf will need to be changed too to reflect the new home for Grub on sda1 (or sda) instead of sda4. Do not neglect to do this, unless you like being hosed by an update!!!
This I'm antsi about. The 3 -> 0 is OK. A few other things got scru'd up by the various efforts; I clean those up and get back to y'all on this net week. Thanks for hanging in there with me. -- Sometimes I lie awake at night, and I ask, "Where have I gone wrong?" Then a voice says to me, "This is going to take more than one night." Charles M. Schulz, Charlie Brown in "Peanuts" -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/22 11:38 (GMT-0400) Anton Aylward composed:
Felix Miata said:
AFAIK, rsync copies files between systems, which is not where the part of Grub that begins the boot process lives.
Despite what I've managed to get working, I don't understand that comment.
The part of Grub that matters most gets installed to boot sectors, not onto filesystems. Copying files from one partition to another is not _installing_ Grub. Grub only works when _installed_. ...
All the above is in all the man page and howtos around.
I found that and did that :-) But ... BuQQer! It still did not work!
Close but not there.
Precisely what does "did not work" mean? Without more, there's little help anyone can give other than to repeat what was already written. Tell us what did happen, exactly!
You still need to mount sda1 and replace occurrences of (hd0,2) with (hd0,0) in menu.lst. Then you should be unhosed, good to go.
Actually it was (hd0,3) that needed replacing :-)
I think I need a brain replacement myself.
Before update time, /etc/grub.conf will need to be changed too to reflect the new home for Grub on sda1 (or sda) instead of sda4. Do not neglect to do this, unless you like being hosed by an update!!!
This I'm antsi about.
Updating your system with YOU or YaST or zypper occasionally includes a reinstallation of Grub. That process is configured via /etc/grub.conf. Yours will probably have a line like: setup --stage2=/boot/grub/stage2 --force-lba (hd0,3) (hd0,3) that will need to be changed to: setup --stage2=/boot/grub/stage2 --force-lba (hd0,0) (hd0,0) prior to any update reinstalling Grub, unless you want to risk having updates messing with whatever might happen to be on (hd0,3) if it exists at that time, and for the Grub update to not be applied where it needs to be on (hd0,0). -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata said the following on 04/22/2011 12:15 PM:
On 2011/04/22 11:38 (GMT-0400) Anton Aylward composed:
Felix Miata said:
AFAIK, rsync copies files between systems, which is not where the part of Grub that begins the boot process lives.
Despite what I've managed to get working, I don't understand that comment.
The part of Grub that matters most gets installed to boot sectors, not onto filesystems. Copying files from one partition to another is not _installing_ Grub. Grub only works when _installed_.
AH! Enlightenment. Its a shame that when I tried running grub-install.unsupported from teh LiveCD I got a message telling me there was no BIOS partition. This discouraged me from pursuing that avenue. [ WTF is a 'BIOS Partition'? ]
...
All the above is in all the man page and howtos around.
I found that and did that :-) But ... BuQQer! It still did not work!
Close but not there.
Precisely what does "did not work" mean? Without more, there's little help anyone can give other than to repeat what was already written. Tell us what did happen, exactly!
Well that "BIOS Partition" thing threw me and I wasted time with the 'repair disk' - the "Repair Installation System" on the DVD, and tried to resurect the old /boot partition, which was a Loooong waste of time. When I got grub into the MBR and it came up the message that it could not find /message went by too fast for me to notice and the menu options all ended up with "file not found". It took me a while - this was about 3am and I wasn't at my sharpest - that the problem was the (hd0,3) referring to the partition with the old /boot. After six hours sleep and a bit of reading I got that and was back on track. Moral: Don't try this when you're tired.
You still need to mount sda1 and replace occurrences of (hd0,2) with (hd0,0) in menu.lst. Then you should be unhosed, good to go.
Actually it was (hd0,3) that needed replacing :-)
I think I need a brain replacement myself.
Nah, just get rid of the fatigue poisons. That worked or me :-)
Before update time, /etc/grub.conf will need to be changed too to reflect the new home for Grub on sda1 (or sda) instead of sda4. Do not neglect to do this, unless you like being hosed by an update!!!
This I'm antsi about.
Updating your system with YOU or YaST or zypper occasionally includes a reinstallation of Grub. That process is configured via /etc/grub.conf. Yours will probably have a line like:
setup --stage2=/boot/grub/stage2 --force-lba (hd0,3) (hd0,3)
that will need to be changed to:
setup --stage2=/boot/grub/stage2 --force-lba (hd0,0) (hd0,0)
Done. Now reads setup --stage2=/boot/grub/stage2 --force-lba (hd0,0) (hd0,0) setup --stage2=/boot/grub/stage2 --force-lba (hd0,5) (hd0,0) setup --stage2=/boot/grub/stage2 --force-lba (hd0) (hd0,0) quit More to follow ..... -- Security is like a box of chocolates: everyone thinks they want it, then they bite down and realize it's not the flavor they were expecting. -- Andy Scoggins, Sat, 5 Aug 2006 20:58:17 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/22 14:12 (GMT-0400) Anton Aylward composed:
Its a shame that when I tried running grub-install.unsupported from teh LiveCD I got a message telling me there was no BIOS partition. This discouraged me from pursuing that avenue.
[ WTF is a 'BIOS Partition'? ]
The Grub script couldn't find /boot/grub/device.map, or at least it wasn't where it expected it to be, so didn't know how to convert from /dev/sda to (hd0), /dev/sdb to (hd1), etc. If you remove the /boot that shows up in a dirlist on a live CD boot, create a new /boot dir, and mount the partition in need of repair on /boot, then the script(s) will find device.map and you shouldn't see messages like that. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (7)
-
Anton Aylward
-
Anton J Aylward
-
Brian K. White
-
Felix Miata
-
Per Jessen
-
Rodney Baker
-
Tejas Guruswamy