LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-23-2011, 06:47 PM   #31
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22

Fixed the old HDD so that is booting OK now.
but I'm still having problems getting the new HDD to work.

I'm trying to "setup" the new HDD without using a rescue disk.
I sure am doing something wrong or am missing some part of making it bootable.
One time I tried to boot from it, it said something about my /dev/sdb3/ and that is the new "swap" drive, but that can't make it unbootable I think.

so... I still need help and lots of it
 
Old 04-23-2011, 07:10 PM   #32
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
If you have changed not only the size of the partitions (in comparison to your old setup) but also the order of the partitions, you also have to adapt the /etc/fstab file of the new system, especially when your system is now on /dev/sdb instead of /dev/sda.
I personally would recommend to remove the dying disk and fix your new install from a live-CD, that should be much easier and will prevent later trouble, when you have to remove the dying disk anyways.
So please, remove the old disk, boot from a live-CD and post the output of
Code:
sudo fdisk -l
and the contents of your /etc/fstab and /boot/grub/menu.lst, of course from the new system.
 
Old 04-23-2011, 07:56 PM   #33
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
I'll do that, but...
If I copy all files from the old disk's partitions to the new and then try to install the grub boot on it, that should work, right?

Quote:
[root@unknown mnt]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 16G 12G 3.2G 80% /
tmpfs 470M 0 470M 0% /dev/shm
/dev/sda1 99M 81M 14M 86% /boot
/dev/sda4 95G 34G 57G 38% /data
/dev/sdb1 297M 86M 196M 31% /mnt/1
/dev/sdb2 25G 13G 12G 52% /mnt/2
/dev/sdb4 158G 34G 116G 23% /mnt/4

I've copied all partitions, the '/' and the '/data' is the most important partitions
well... the '/' too or else I need to reinstall the system
and after this try to 'grub-install' that SHOULD make the disk bootable and a copy of the old one, right?
 
Old 04-23-2011, 08:00 PM   #34
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
As long as you remove the old disk before the grub-install that should work, yes.
 
Old 04-23-2011, 08:08 PM   #35
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
so I have to remove it... hmmm
thought I could do it on the fly
k... I'll try that
 
Old 04-23-2011, 08:20 PM   #36
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
oh, but I have to start it with in "rescue" right?
and chroot the /mnt/sysimage and THEN do the grub-install?
 
Old 04-23-2011, 08:27 PM   #37
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You don't need to chroot, just mount your new system (don't forget the boot partition) and then use the --root-directory option. In your case, after removing the old disk and starting from a live-CD it should look somewhat like this:
Code:
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
grub-install --root-directory=/mnt /dev/sdb
 
Old 04-23-2011, 09:48 PM   #38
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
Tried this 5 times now and after
Quote:
mount /dev/sda2 /mnt
the /mnt/boot doesn't seem to exist.

so in the latest "try" I tried to
Quote:
ls -al
but then all of a sudden no directories existed at all.


so again(getting more and more confused...) by your latest post...
you mean, after have booted on the original drive and copied all files from the original partition to the new disk's partitions...
Then I remove the old HDD and with a the "full" Fedora 12 DVD and using 'rescue' mode... get "into" the prompt and then do the
mountings as you say?
If I mount /dev/sda2 /mnt ... then not one directory exist at all.
seems to me like a bad disk or something, but the disk when checked is OK.
If I 'umount' I still get the same, like no directory exists.


I'm off this for tonight, but any clues for this will help...
 
Old 04-23-2011, 11:44 PM   #39
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
According to your previous posts the second primary partition, which should be /dev/sda2 when no other disk is in the system, is the /-partition of your new system.
When after trying to mount it with
Code:
mount /dev/sda2 /mnt
there are no files in /mnt that can only mean that either the mount failed (got any error messages?) or you didn't copy the files.
 
Old 04-24-2011, 03:54 PM   #40
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
There was some error of some sort on the new disk so I recopied all and then the it worked... well the mount anyways

If I now just have the NEW drive attached then the thing you said before:
Quote:
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
grub-install --root-directory=/mnt /dev/sdb
That must be ALL /dev/sdax you mean right? since that's the only HDD device in /dev/
If mounted these in /mnt/1/ and /mnt/1/boot/
If I do that then I get this:

Quote:
bash-4.0# grub-install --root-directory=/mnt/1/ /dev/sda
/sbin/grub: Not found
What is not found cos 'grub' is there
 
Old 04-24-2011, 03:59 PM   #41
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
and if I chroot into sysimage and try grub-install
then I get this error:
Quote:
bash-4.0# grub-install /dev/sda
Could not find device for
and the text is cut off yes
 
Old 04-24-2011, 04:05 PM   #42
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Try this:
Code:
mount /dev/sda2 /mnt/1
mount /dev/sda1 /mnt/1/boot
mount --bind /dev /mount/1/dev
mount --bind /proc /mount/1/proc
mount --bind /sys /mount/1/sys
chroot /mount/1
grub-install /dev/sda1
exit
umount /mnt/1/sys
umount /mnt/1/proc
umount /mnt/1/dev
umount /mnt/1/boot
umount /mnt/1
Then reboot, and it should work
 
Old 04-24-2011, 04:17 PM   #43
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
First I guess you meant mnt for all mount
I tried that but I still get the same error:

oh and is it /dev/sda or /dev/sda1 I should use for installing grub?
I tried both though

Quote:
bash-4.0# grub-install /dev/sda1
Could not find device for
 
Old 04-24-2011, 04:25 PM   #44
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
It should be /dev/sda for installing grub.
Please do the mounts, chroot into the new system and post the output of
Code:
ls /dev/sd*
 
Old 04-24-2011, 04:34 PM   #45
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
I got them all in there...

Quote:
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4
 
  


Reply



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
How to decrease size of a libc-2.5.1.so? Nad0x00 Linux From Scratch 3 11-14-2007 05:08 AM
How to decrease text editor size? marcoguillen Linux - Software 2 03-24-2007 02:44 AM
How do I decrease K-Menu size? Slamtilt Linux - Software 4 01-12-2006 02:18 PM
photo's size decrease with 'convert' ? thelonius Linux - Software 1 10-04-2005 09:28 PM
How To Decrease Mozilla 1.6 Browser Menu Font Size Ian Linux - Software 3 06-07-2004 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:11 PM.

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