Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Debian Linux > Debian Linux Users forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-10-2008, 01:59 PM
Paul Csanyi
 
Posts: n/a
Default migrating Debian GNU/Linux Etch to second SATA drive

Hello!

I tried to migrating from the first to second SATA drive My Debian
Etch OS with Gparted.

I copied the /, /usr, /var, swap, /tmp, /home partitions of the system
to the second SATA: sdb with Gparted.

Then I tried to set up grub to boot this Debian system from the first
SATA drive sda, and did the following:

- boot the install CD of the Etch Netinstall
- at prompt use expert
- ...
- detecting disks
- did not disk partition
- run a shell

Here I follow the mini howto:
http://wiki.archlinux.org/index.php/Reinstalling_GRUB

cd /
mount -t ext3 /dev/discs/disc1/part1 /mnt
# this is the / partition of the sdb
mount -t ext3 /dev/discs/disc1/part2 /mnt/usr
# this is the /usr partition of the sdb
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt /bin/bash

grub-install /dev/sda

Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
corresponding BIOS drive.

I can't here as root to use nano because of the bterm error. I did the
following to get some editor, namely mcedit:

TERM=xterm
export TERM
mcedit /etc/fstab

I can to use here mcedit, but with difficulties. Still can to edit
fstab, however.

But, I can't to install grub to boot sdb root from the sda MBR.

Any advices will be appreciated!


--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-10-2008, 01:59 PM
Kevin Mark
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA drive

On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
> Hello!
>
> cd /
> mount -t ext3 /dev/discs/disc1/part1 /mnt
> # this is the / partition of the sdb
> mount -t ext3 /dev/discs/disc1/part2 /mnt/usr
> # this is the /usr partition of the sdb
> mount -t proc proc /mnt/proc
> mount -t sysfs sys /mnt/sys
> mount -o bind /dev /mnt/dev
> chroot /mnt /bin/bash
>


>
> But, I can't to install grub to boot sdb root from the sda MBR.
>
> Any advices will be appreciated!
>


Is the partition mounted rw ?
-K
--
| .''`. == Debian GNU/Linux == | my web site: |
| : :' : The Universal |mysite.verizon.net/kevin.mark/|
| `. `' Operating System | go to counter.li.org and |
| `- http://www.debian.org/ | be counted! #238656 |
| my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to help Debian! |
|_______ Unless I ask to be CCd, assume I am subscribed _______|


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-10-2008, 01:59 PM
NN_il_Confusionario
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA drive

On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
> corresponding BIOS drive.


is /etc/mtab correct ?

is /boot/grub/device.map (which might be created by grub-install by
reading /etc/mtab) correct ?

have you searched google

Linkname: grub error does not have any corresponding BIOS drive - Google Search
URL:
http://www.google.com/search?num=100...ve&btnG=Search

?

--
Chi usa software non libero avvelena anche te. Digli di smettere.
Informatica=arsenico: minime dosi in rari casi patologici, altrimenti letale.
Informatica=bomba: intelligente solo per gli stupidi che ci credono.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-10-2008, 02:00 PM
Paul Csanyi
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA drive

Kevin Mark <kevin.mark@verizon.net> writes:

> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>> Hello!
>>
>> cd /
>> mount -t ext3 /dev/discs/disc1/part1 /mnt
>> # this is the / partition of the sdb
>> mount -t ext3 /dev/discs/disc1/part2 /mnt/usr
>> # this is the /usr partition of the sdb
>> mount -t proc proc /mnt/proc
>> mount -t sysfs sys /mnt/sys
>> mount -o bind /dev /mnt/dev
>> chroot /mnt /bin/bash
>>

>
>>
>> But, I can't to install grub to boot sdb root from the sda MBR.
>>
>> Any advices will be appreciated!
>>

>
> Is the partition mounted rw ?


Which partition?
nano /etc/mtab

....
/dev/sdb1 / ext3 rw,errors=remount-ro 0 0

Did you mean this abowe?
This is the:
/dev/discs/disc1/part1

mounted as /mnt

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-10-2008, 02:00 PM
Paul Csanyi
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA drive

NN_il_Confusionario <pinkof.pallus@tiscalinet.it> writes:

> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
>> corresponding BIOS drive.

>
> is /etc/mtab correct ?
>
> is /boot/grub/device.map (which might be created by grub-install by
> reading /etc/mtab) correct ?


Yes, it is:
nano /etc/mtab

....
/dev/sdb1 / ext3 rw,error=remount-ro 0 0

> have you searched google
>
> Linkname: grub error does not have any corresponding BIOS drive\
> - Google Search
> URL:
>

http://www.google.com/search?num=100...rror+does+not\
+have+any+corresponding+BIOS+drive&btnG=Search
>
> ?


I checked /boot/grub/device.map:
(hd0) /dev/sda
(hd1) /dev/sdb

I edited menu.lst:
# kopt=root=/dev/sdb1 ro

# groot=(hd1,0)

I run grub-install with --recheck option.

Still I have no success.

I boot the Debian Etch system from the sda, and check the /boot/grub/
directory of the Debian Etch system from the sdb. There I find strange
situation. The /boot/grub/ directory contain another /boot directory
with grub/. I removed this second boot/grub/ directory.

This must be the case because when I tried to run grub-install I tried
also to reinstall grub with aptitude reinstall grub..

I shall reboot to see how it works the grub-install now.

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-10-2008, 02:00 PM
Paul Csanyi
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA drive

Paul Csanyi <csanyipal@gmail.com> writes:

> NN_il_Confusionario <pinkof.pallus@tiscalinet.it> writes:
>
>> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>>> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
>>> corresponding BIOS drive.

>>
>> is /etc/mtab correct ?
>>
>> is /boot/grub/device.map (which might be created by grub-install by
>> reading /etc/mtab) correct ?

>
> Yes, it is:
> nano /etc/mtab
>
> ...
> /dev/sdb1 / ext3 rw,error=remount-ro 0 0
>
>> have you searched google
>>
>> Linkname: grub error does not have any corresponding BIOS drive\
>> - Google Search
>> URL:
>>

> http://www.google.com/search?num=100...rror+does+not\
> +have+any+corresponding+BIOS+drive&btnG=Search
>>
>> ?

>
> I checked /boot/grub/device.map:
> (hd0) /dev/sda
> (hd1) /dev/sdb
>
> I edited menu.lst:
> # kopt=root=/dev/sdb1 ro
>
> # groot=(hd1,0)
>
> I run grub-install with --recheck option.
>
> Still I have no success.
>
> I boot the Debian Etch system from the sda, and check the /boot/grub/
> directory of the Debian Etch system from the sdb. There I find strange
> situation. The /boot/grub/ directory contain another /boot directory
> with grub/. I removed this second boot/grub/ directory.
>
> This must be the case because when I tried to run grub-install I tried
> also to reinstall grub with aptitude reinstall grub..
>
> I shall reboot to see how it works the grub-install now.


No success.

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-10-2008, 02:00 PM
Paul Csanyi
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA drive

Paul Csanyi <csanyipal@gmail.com> writes:

> Paul Csanyi <csanyipal@gmail.com> writes:
>
>> NN_il_Confusionario <pinkof.pallus@tiscalinet.it> writes:
>>
>>> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>>>> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
>>>> corresponding BIOS drive.
>>>
>>> is /etc/mtab correct ?
>>>
>>> is /boot/grub/device.map (which might be created by grub-install by
>>> reading /etc/mtab) correct ?

>>
>> Yes, it is:
>> nano /etc/mtab
>>
>> ...
>> /dev/sdb1 / ext3 rw,error=remount-ro 0 0
>>
>>> have you searched google
>>>
>>> Linkname: grub error does not have any corresponding BIOS drive\
>>> - Google Search
>>> URL:
>>>

>> http://www.google.com/search?num=100...rror+does+not\
>> +have+any+corresponding+BIOS+drive&btnG=Search
>>>
>>> ?

>>
>> I checked /boot/grub/device.map:
>> (hd0) /dev/sda
>> (hd1) /dev/sdb
>>
>> I edited menu.lst:
>> # kopt=root=/dev/sdb1 ro
>>
>> # groot=(hd1,0)
>>
>> I run grub-install with --recheck option.
>>
>> Still I have no success.
>>
>> I boot the Debian Etch system from the sda, and check the /boot/grub/
>> directory of the Debian Etch system from the sdb. There I find strange
>> situation. The /boot/grub/ directory contain another /boot directory
>> with grub/. I removed this second boot/grub/ directory.
>>
>> This must be the case because when I tried to run grub-install I tried
>> also to reinstall grub with aptitude reinstall grub..
>>
>> I shall reboot to see how it works the grub-install now.

>
> No success.


At last I have success!

I don't use grub-install command but run grub on the command line,
and:
grub> root (hd1,0)
grub> setup (hd0)
grub> quit

Success!!

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-10-2008, 02:00 PM
hh.eu@gmx.de
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA drive

I am not sure if I understood you correctly, so please correct me if
I am
wrong, but I assume:

* you have basically moved all needed partitions for a full Debian
system from
one disk to another,

* and now you want to install GRUB to this second disk so that GRUB
can boot
from that disk (and you can eventually remove the old disk from
the system).

Can you still (temporarily) boot from your first disk where GRUB is
still
installed? You don't need to be able to boot Debian from the old
disk, you
just need a working GRUB install there. Does GRUB display a menu when
you boot
from your old disk?

Then you can use the GRUB shell, and within the GRUB shell you can
run several
commands to install GRUB to the second, new hard disk.

You get to the GRUB shell by pressing the "c" key when GRUB displays
the menu.
(Maybe you have to press "Esc" first, I am not sure and can't try it
now.)

Let me know if this would work for you, then I could tell you more
about which
commands to run in the GRUB shell.

Am 2008-05-08 um 23:12 schrieb Paul Csanyi:

> Hello!
>
> I tried to migrating from the first to second SATA drive My Debian
> Etch OS with Gparted.
>
> I copied the /, /usr, /var, swap, /tmp, /home partitions of the system
> to the second SATA: sdb with Gparted.
>
> Then I tried to set up grub to boot this Debian system from the first
> SATA drive sda, and did the following:
>
> - boot the install CD of the Etch Netinstall
> - at prompt use expert
> - ...
> - detecting disks
> - did not disk partition
> - run a shell
>
> Here I follow the mini howto:
> http://wiki.archlinux.org/index.php/Reinstalling_GRUB
>
> cd /
> mount -t ext3 /dev/discs/disc1/part1 /mnt
> # this is the / partition of the sdb
> mount -t ext3 /dev/discs/disc1/part2 /mnt/usr
> # this is the /usr partition of the sdb
> mount -t proc proc /mnt/proc
> mount -t sysfs sys /mnt/sys
> mount -o bind /dev /mnt/dev
> chroot /mnt /bin/bash
>
> grub-install /dev/sda
>
> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
> corresponding BIOS drive.
>
> I can't here as root to use nano because of the bterm error. I did the
> following to get some editor, namely mcedit:
>
> TERM=xterm
> export TERM
> mcedit /etc/fstab
>
> I can to use here mcedit, but with difficulties. Still can to edit
> fstab, however.
>
> But, I can't to install grub to boot sdb root from the sda MBR.
>
> Any advices will be appreciated!
>
>
> --
> Regards, Paul Csanyi
> http://www.freewebs.com/csanyi-pal/index.htm
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-10-2008, 02:00 PM
hh.eu@gmx.de
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA drive


Am 2008-05-09 um 22:13 schrieb Paul Csanyi:
> At last I have success!
>
> I don't use grub-install command but run grub on the command line,
> and:
> grub> root (hd1,0)
> grub> setup (hd0)
> grub> quit


OK, I hadn't seen this last message from you when I wrote mine, but I
see that
you have had success with exactly what I was going to suggest to you.

I am just wondering if you are aware that you still need your first disk
installed to boot the second. So far, GRUB is not installed on the
second
disk, so if your first disk breaks, you will not (easily) be able to
boot from
the second disk. I am not sure about what you are doing with those
two disks,
but maybe it is wise to install GRUB also to the second disk, in case
you
remove the first one at some point. (Or you could directly boot from the
second disk.)

By the way, if you have a floppy drive, you can install GRUB on a
floppy, too,
then you have a GRUB emergency disk which lets you perform operation
such as
those you described (in the GRUB shell) (for cases of drive failure
etc.).

-Moritz


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-10-2008, 02:00 PM
NN_il_Confusionario
 
Posts: n/a
Default Re: migrating Debian GNU/Linux Etch to second SATA

> * From: Paul Csanyi <csanyipal@gmail.com>
>NN_il_Confusionario <pinkof.pallus@tiscalinet.it> writes:
>> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>>> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
>>> corresponding BIOS drive.

>>
>> is /etc/mtab correct ?
>>
>> is /boot/grub/device.map (which might be created by grub-install by
>> reading /etc/mtab) correct ?

>
>Yes, it is:
>nano /etc/mtab
>...
>/dev/sdb1 / ext3 rw,error=remount-ro 0 0


It is not, if I have understood correctly your aims.

When I have an i386 / amd64 installation on (say) sda and I want to copy
it on (say) a new disk sdb in such a way that when the new disk is
installed as sda it boots as a "clone" (but with partitions of different
size; if sda and sdb are identical I use dd) of the old sda, this is
what I do:

recreate partition table and filesystems on sdb

mount the / of the new disk as (say) /tmp/NEW/ and then the /var/ (say)
of the new disk on /tmp/NEW/var/ , and so on.

clone the contents of the filesystems (with rsync or whatever)

chroot /tmp/NEW/

and then inside the chroot I mount what i need:

mount /proc/
mount /sys/ # if needed, for example to recreate a yaird initrd
mount /dev/pts
(and so one for every "virtual" filesystem which I need. I do not use udev)

finally (still in the chroot) I edit two files:

(1) I edit /etc/mtab in such a way that it corresponds to /etc/fstab ;
so in your case it would be

/dev/sda1 / ext3 rw,error=remount-ro 0 0

(sda and not sdb). The rule is: the mtab must contain the lines that it
will contain when the system will be booted from he new disk.

(2) I edit /boot/grub/device.map ; this way the logic seems opposite to
the previous one; in your case this would be:

(hd0) /dev/sdb

This line means: the disk that grub and the bios will see as the first
one (hd0) when the system will be booted, is the disk that Linux is
seeing as hdb in the moment that grub-install is executed.

(3) I run

grub-install /dev/sdb

Note: "(hd0) /dev/sdb" versus "(hd1) /dev/sdb" changes a bit in the boot
record which is written in the MBR of sdb.

(4, optional but useful to avoid confusion) I re-edit
/boot/grub/device.map so that it will be correct onece the sistem will
be booted from the new disk ; in your case

(hd0) /dev/sda

Finally I umount the special filewistems, the (say) /var/ partition (and
so on), I exit the chroot, I umount even the / partition of the new disk.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:36 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433