LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to DEcrease disk size (https://www.linuxquestions.org/questions/linux-software-2/how-to-decrease-disk-size-875386/)

TobiSGD 04-22-2011 05:51 PM

Quote:

Originally Posted by Basher52 (Post 4333049)
Frell :( :(
My brain sure ain't with my tonight...

I mounted the DVD into /mnt/dvd
I chrooted into my "new" disk and then I want to reinstall grub.
but when I chroot I can't get to the DVD :(

What am I missing here :(

Copy the rpm-package that you want to install to the new system first. If it is mounted in /mnt/harddisk the copy the file to /mnt/disk/tmp, for example. You will then find it in /tmp after chrooting.
Alternatively, mount the disc to a folder in the new system. Again, if the new system is mounted in /mnt/harddisk, you can mount the DVD to /mnt/harddisk/mnt, so that you will find it in /mnt after chrooting.

Basher52 04-22-2011 06:06 PM

Well I DO have that :p

You told me that sr0 is the DVD and that worked fine :)
I mounted the DVD in '/mnt/dvd' and I could see the files.
Then I chrooted to my new disk, but then the DVD was gone and the '/dev' list had only had a 'null' device so I can't get into 'Packages' of the DVD

TobiSGD 04-22-2011 06:08 PM

Where have you mounted your new system? When you chroot to it you can not see any directory that is outside the folder you chroot into.

Basher52 04-22-2011 06:26 PM

I mount the DVD into '/mnt/dvd' using 'mount /dev/sr0/ /msn/dvd/'
My new system is on '/mnt/2'

I chrooted to '/mnt/2' which is my new disk's '/' folder, not the '/boot/' or any other...

After I do that the DVD is gone and I can't get into 'Packages' since the only device under '/dev' is null.
and it seems that I can't get "outside" the newly mounted system since the 'root' of it is the new disk's '/'.

TobiSGD 04-22-2011 06:32 PM

As I stated above, you have to mount the DVD inside the new system, but before you chroot into it. In your case I would mount it to /mnt/2/mnt, so after chrooting you can access it under /mnt in the new system.

Basher52 04-22-2011 07:02 PM

Yep that worked, but I guess you meant that I should mount it to '/mnt/2/mnt/dvd/'

What is now THIS!!!

Quote:

no root device found
mapscrn: cannot open map file _iso15_
Didn't get this the last time.

just to be perfectly clear, the "new system(disk)" is the partition with '/' right? not '/boot/'

UPDATE:
didn't see your post: http://www.linuxquestions.org/questi...ml#post4333054
Sorry about that

TobiSGD 04-22-2011 07:10 PM

If you have a separate /boot-partition you have to mount that also into your new system, also before you chroot into it. So if your /boot-partition is /dev/sda2 the do
Code:

mount /dev/sda2 /mnt/2/boot
before chrooting into it.

Basher52 04-22-2011 07:31 PM

my new system is:
/dev/sdb1 = /boot
/dev/sdb2 = /
/dev/sdb3 = swap to be
/dev/sdb4 = /data, just the rest, made up by me.


so I mount NOT to /dev/sdb2/ but to /dev/sdb1/ ??
if so... I thought the "system" was '/' and the '/boot/' was only for boot, not the system itself.

Basher52 04-22-2011 07:50 PM

Think I read you wrong again...
I'm gonna try what I THINK!! you told me and get back to ya :)
...

TobiSGD 04-22-2011 07:58 PM

Just to clarify that, your new system is the /-partition (in your case sdb2), the files needed to boot the system are in /boot (sdb1). Of course, if you want to reinstall the boot-loader you have to mount the /boot-partition.
So in your case:
Code:

mount /dev/sdb2 /mnt/2
mount /dev/sdb1 /mnt/2/boot


Basher52 04-22-2011 08:50 PM

..and I 'grub-install' on what device?
on the NOT chrooted device: '/mnt/2/'
or just: '/boot', as in the newly chrooted /boot directory?

TobiSGD 04-22-2011 08:54 PM

It depends on your operating systems and how you want to start them. What is on your sda-disk?
Best would be to install grub to the MBR of your first harddisk (sda), so you should install it to /dev/sda (not sda1).

Basher52 04-23-2011 06:33 AM

The /dev/sda is the old boot disk that are about to go up in flames due to bad blocks.
so I want to install a new disk and that is /dev/sdb

I'll install grub on /dev/sdb then, but that device won't show up when chrooted :(

Basher52 04-23-2011 01:20 PM

tried to grub-install to /dev/sdb when NOT chrooted and got this:

Quote:

# grub-install /dev/sdb
/dev/sdb does not have any corresponding BIOS drive.
so I:
Quote:

grub-install --recheck --root-directory=/mnt/2/ /dev/sdb
It seemed to go OK, but now I'll see if I can boot on the new drive...
I'll be back :p

Basher52 04-23-2011 02:06 PM

Seems like I have unaware done something to the old drive too, cos now that won't boot either :(
more fiddling I guess :p


Update will follow


All times are GMT -5. The time now is 03:18 AM.