New additional hard disk for Mageia 5 on Mageia 1 system

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

New additional hard disk for Mageia 5 on Mageia 1 system

Postby stargazerinwg » Aug 5th, '15, 22:34

PC is an HP Pavillion Elite 9120f (64 bit quad AMD) with a WD 1TB drive with Mageia 1 installed.

I know I should have upgraded long ago but this PC and Mageia 1 have been great.

Now I would like to install Mageia on a new additional hard disk and still have access to the old one so I can move data over to the new system. I would re-purpose the old drive as a large storage area once the data is moved to the new drive. I have DVD back-ups of important data but I would like to move over some video and other files that are too large to easily backup on DVDs. I also bought an upgrade video card I want to install in the process.

I am not sure what the best way to do this would be. I could install Mageia 5 to the new disk with the old disk not connected but what would happen when I did re-connect the old one along with the new one? If I install Mageia 5 with both disks connected, will there be an option to remove the boot loader on the old disk? Will Mageia 5 “automatically” mount the old disk (if connected)? Is there a way to include the old system as a boot option on the new Mageia 5 installation?

Also, I don't know how the bios boot priority affects the bootloader.

Appreciate any advice - maybe what I want to do just not the right approach and there is a better way.

Thanks.
stargazerinwg
 
Posts: 19
Joined: Nov 2nd, '11, 00:15

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby benmc » Aug 6th, '15, 00:41

You have a few choices.

stargazerinwg wrote: Will Mageia 5 “automatically” mount the old disk (if connected)?
No, but you can enable this using "custom disk partitioning". I have labelled my spare HDDS " extra" and "extra1",and they are immediately available after install, but you can certainly mount the drives after the install.
stargazerinwg wrote: Is there a way to include the old system as a boot option on the new Mageia 5 installation?
Yes, if you use GRUB legacy you can check at the end of the installation and add if missing as you configure the boot loader, you can also designate where the boot-loader is to be installed, sda or sdb.
GRUB 2 should also automatically find all OSes installed and list them at the boot screen.

P.s. If your system is UEFI enabled, and you are installing x64 Classical or LIve system, you only have GRUB 2 option.
benmc
 
Posts: 1214
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby stargazerinwg » Aug 7th, '15, 00:19

Thanks benmc. I will be trying this in the next week or two and will post results.

It sounds like it should be fairly straightforward.
stargazerinwg
 
Posts: 19
Joined: Nov 2nd, '11, 00:15

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby stargazerinwg » Sep 6th, '15, 21:31

I installed Mageia 5 on the new disk with the old disk connected.
I used custom disk partitioning, selected the new disk, and choose auto-allocate.
I used the default KDE installaltion and it all went OK.
When I rebooted, I changed the HDD priority in the BIOS to the new drive and when it tried to boot said No Operating System Found so I changed the priority to the old drive and it booted.

So, I believe that says the bootloader is on the old drive rather than the new one. I did not expect this but rather thought it would load on the new drive.

Not such a big deal except that it seems like it may make more difficult to re-purpose the space on the old drive.

I used Dolphin to access the old drive and after giving the root password it lets me access most of the files on the old drive. I say most because, it will not let me copy any . files. However, I had made copies of several I wanted, most notably my .thunderbird and I copied that to the new user home on the new disk and Thunderbird started but could not read my address book. All of my saved local files are there. Each time Thunderbird starts, it appears to be checking for compatibility and says: Unable to load address book file abook.mab. It may be read-only, or locked by another application. Please try again later. When I open abook.mab, the data addresses appear to be there.
Would anyone know of a way around this situation? If I delete abook.mab (after saving a copy), will Thunderbird create a new blank abook.mab?

Thanks if you have any insight to deal with Thunderbird.
stargazerinwg
 
Posts: 19
Joined: Nov 2nd, '11, 00:15

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby jiml8 » Sep 6th, '15, 23:48

I cannot help you with thunderbird because I do not use it.

However, having grub and your master boot record on the old disk won't affect you when you repurpose that disk as a data disk. You will be better off, however, if you install grub on your new system disk. This way, you won't be dependent upon two different drives for booting.

I do this from time to time, but frankly I don't do it often enough that I can just rattle off the commands to do it; I always have to look it up.

Presuming you are using grub and not grub2, this is how you do it.

First, remember that grub refers to drives as hd0, hd1, and so forth. Usually, unless you have done something unusual, /dev/sda->hd0, /dev/sdb->hd1, and so forth. You should check in /boot/grub/device.map to see how these drives are mapped.

Also remember that grub numbers partitions from 0. Thus, the first partition on drive hd0 is known to grub as (hd0,0), the second partition is (hd0,1) and so forth. Based upon this information, figure out which partition on your new drive contains /boot.

Once you have done this, start grub from the command line. For purposes of this command sequence, I am going to assume that your boot partition is on /dev/sdb1 which, presumably, will be (hd1,0) according to grub (again, confirm this using /boot/grub/device.map).

So, as root, start grub, then tell it where to boot from, then tell it to install itself (setup) on that drive:
Code: Select all
grub
root (hd1,0)
setup (hd1)
quit


And that should do it.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby stargazerinwg » Sep 7th, '15, 00:28

Thank you sir! I will investigate and report back here.
stargazerinwg
 
Posts: 19
Joined: Nov 2nd, '11, 00:15

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby doktor5000 » Sep 7th, '15, 08:57

stargazerinwg wrote:I used Dolphin to access the old drive and after giving the root password it lets me access most of the files on the old drive. I say most because, it will not let me copy any . files. However, I had made copies of several I wanted, most notably my .thunderbird and I copied that to the new user home on the new disk and Thunderbird started but could not read my address book. All of my saved local files are there. Each time Thunderbird starts, it appears to be checking for compatibility and says: Unable to load address book file abook.mab. It may be read-only, or locked by another application. Please try again later. When I open abook.mab, the data addresses appear to be there.
Would anyone know of a way around this situation? If I delete abook.mab (after saving a copy), will Thunderbird create a new blank abook.mab?

Thanks if you have any insight to deal with Thunderbird.

Please put that into a separate thread. And yes, if you rename/move away abook.mab (personal adress book) and history.mab (collected adresses, adresses that you sent mail to) thunderbird will recreate blank new ones.
Afterwards you can put your backups in place again, when thunderbird is not running.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby wintpe » Sep 7th, '15, 11:36

I did this with the second drive still connected, and it caused me all sorts of issues, that i tried many things to get around.

I would therefore say, build the new drive with the old one disconnected.

then add the old drive back in, and add a bootable drive/partition to the boot loader/grub for the second (old one) to the mga5 grub.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby stargazerinwg » Sep 7th, '15, 14:43

Hmm ... that is what I was originally going to do.

I am having some other problems, e.g., the system will not suspend now and it does not appear to hibernate correctly, both of which worked correctly on the old Mageia 1 system. Suspend asks for root pw but it comes up in a background window that you have to look for it but even then the system does not suspend. I have also had the problem where it doesn't recognize the root password until I reboot the system.

Peter, did you end up re-doing your install with the old drive disconnected after having installed with it connected? I wouldn't need to boot my old drive/system but do need to be able to mount it to access the data there. I have backups of important files but some of the video was too large and it would be much more convenient to use the old drive than backup media. Did you have any problems mounting the old drive? I would rebuild using the existing partitions and not format the home partition so I wouldn't have to reload data I have already moved.
stargazerinwg
 
Posts: 19
Joined: Nov 2nd, '11, 00:15

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby wintpe » Sep 7th, '15, 15:45

re Peter, did you end up re-doing your install with the old drive disconnected

yes

I could not personally unravel the mess id created.

So i had two drives in my PC all along, one a 128 gig ssd and a new 256 ssd

id decided at some point way back to install mga3 on the new 256 ssd as i thought being corsairs new gen would be faster, but the sandforce was clearly faster (ie the 128) so when mga5 came along i decided to put the 128 back as the root disk and have the 256 as the data drive.

so i installed mga5 on the 128, but because the boot block of mga3 was on the 256, mga5 also updated the boot block on the 256.

then once i had transferred all my data over that i wanted to keep off the 256 i cleared its partitions, and reformatted it.

at this point the system would not boot.

various attempts to reset the bootblock to the 128 failed and in the end i just gave up and started again.

hence why I say, simplify your situation in the first place, that way you will have two independent systems that will boot on there own.

then add the mga1 to the mga5 and set the mga5 disk as the primary in the bios.

thats how i would be doing it right now on hindsight.

I cant promise it will work perfectly, but what i can promise is you can go back to the start easy enough this way.

viewtopic.php?f=15&t=8837

is the original thread with a few suggestions on how to address the issue.

which i never tried unfortunately.

but it might help you if you decide not to follow my advise above

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby stargazerinwg » Sep 9th, '15, 13:05

I suspect some of the access and permission problems I am having with the old disk may be because I failed to force my new login to the same userid as the old. The usernames are the same. I could fix that by re-installing Mageia 5 on the new disk. I currently can't boot to the old disk, and don't really want to but do want to be able to have free access to it. By re-installing with the old disk disconnected, it will change the disk assignments, that is, what is currently sdb will become sda and vice versa. I don't know if that would cause problems or not.
stargazerinwg
 
Posts: 19
Joined: Nov 2nd, '11, 00:15

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby wintpe » Sep 9th, '15, 17:02

the files on your old home directory might be owned by a different userid.

open up a shell and cd to the path that they are mounted under and run ls -al

lets say for example your new userid is 1000 and the files are all owned by 500.


they are probably also group owned by 500 as well.

to make your id 1000 be able to read all the files in the group 500, add uid 1000 to the groupid 500 in /etc/group on the mga5 /etc/group

if it does not yet exist add the line

xxxxxxx:x:500:500, 1000

the xxxxxx can be anything like olduserid its just an alias to the group 500 it does not matter what it is as long as its unique

this makes 1000 ie your userid also a member of the 500 group, and therefore able to read and write any files that
have the rw flags set for the second octet of the mode.

ie files with ---rw----

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby stargazerinwg » Sep 10th, '15, 22:11

Thanks very much wintpe. I did what you said and was able to fix my Thunderbird problem and also got all the data I wanted copied from the old disk to the new. And I learned more about groups and permissions along the way.

The new installation still will not suspend or hibernate. I think I will reload Mageia 5 on the new disk with the old disk disconnected. I will use the same partitions, not format /home, and use the same userid.

Once that is complete, I want to connect the old drive and reformat it for use as lots of extra storage set up as 2 partitions. On it currently, there are a couple of windows partitions I haven't used for years and the Mageia 1 install. Also, I would like the old drive to be mounted all the time and both partitions fully accessible to my regular user just like /home/user. Now I can't access the old drive without first giving the root password to dolphin each time I start the system. Currently it mounts like this: /run/media/ken0/87c21088-6ee7-4978-b2d4-b6b46a92d510/

Would anyone know if the best way to do the partitioning and formatting of the old disk be to use a Mageia 5 Live DVD? Should I add an entry to /etc/fstab so that it mounts all the time?

Thanks for all your assistance.
stargazerinwg
 
Posts: 19
Joined: Nov 2nd, '11, 00:15

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby wintpe » Sep 14th, '15, 15:08

So assuming your new mga5 system can boot without it, see above.

you dont need a live dvd to repartition the old disk.

first boot up mga 5 and do not select the disk in dolphin.

open up a command prompt and establish what drive you are booted from , by running df -k

now run fdisk -l

so DONT assume that sda will be the mga5 disk and sdb will be the old mga1 disk.

make sure from df -k and fdisk -l that you establish what one you are booted from.

mount is also a good command to see what drive is mounted on /

drive re-ordering means that sda and sdb can swap about , its the blkid that is used in the mount.

run blkid and it will show you the blkid of each partition, and then compare that to /etc/fstab, now hopefully you
understand the relationship, and can safley move forward.

once you have established what drive it is that you want to destroy, you can (provided the drive is a 3TB or less)

simply run fdisk /dev/sdX

now run p

it will now show you the partitions on that disk.

use the d command to remove them

(little note, until you use the w command, nothing has changed, its all just proposed changes in memory)

when all the partitions are clear.

run

n (for new)

hit accept defaults and it will create one partition on the whole disk.

the type is linux.

type p again to confirm

happy?

type w

you can run partprobe to make the partition info get re-read by the operating system, but if it does not work, (use fdisk -l to test) then just reboot.

Now if you needed to reboot go through identifying the new disk again.

lets assume its /dev/sdx for now (it wont be)

the partition will be /dev/sdx1

run

mkfs.ext4 /dev/sdx1 -L MYNEWDISK


if you picked the right disk and did not formt your root filesystem :) many have done it)

then run

blkid|grep /dev/sdx1

grab the UUID="lxkflxkfdlkfldkfldkfddkflkdflfkdlkfdlkflkfdlkfdlk"

add to /etc/fdtab

UUID="lxkflxkfdlkfldkfldkfddkflkdflfkdlkfdlkflkfdlkfdlk" /home2 ext4 noatime,acl, 1 2

save /etc/fstab

make sure the directory /home2 (or whatever it is you want it mounted on exists)

so mkdir /home2

run mount -a

now make sure everyone can write to it

chmod 777 /home2


then df -k

thats it

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby stargazerinwg » Sep 14th, '15, 22:05

Thanks peter for the step-by-step. I am intimidated by the process though. Some of those commands I have never used.

I shouldn't have a problem picking the correct disk. In addition to the models being different, the old disk is the only one with windows partitions. This is why I thought using the live DVD would be helpful since I would clearly see both in MCC/drakconf.

Anyway, I appreciate your help. I may think on this a while before moving ahead.
stargazerinwg
 
Posts: 19
Joined: Nov 2nd, '11, 00:15

Re: New additional hard disk for Mageia 5 on Mageia 1 system

Postby wintpe » Sep 15th, '15, 13:40

then remove your mga5 disk

still boot from the live dvd

but still run through the process above until the fstab bit.

that way you learn with no risk to your mga 5 system.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest