Installing on external HDD to use internaly

hi,
i have an old dell inspiron 7500, with 256mb ram and 100gb disk drive.
the cd rom does not appear to work and i am reluctant to buy a new one for now.

So i am using a new laptop to load opensuse on live cd and install on the dell 100 gb hdd.

the install works fine and when i load external hdd on my new laptop it all works fine.

however when i install the hdd as internal drive to my dell the boot hangs . so goong through safe mode the startup appears to be having trouble with the disk partitions .

the last message i get is waiting for /dev/root device to appear then an error message asking me to try device /dev/sda1 now when i created partitions i changed fstab options to be by device .

Is there a way to somehow reconfigure the disk to work fine on my dell?
or maybe load correctly

this is my first time to use Linux and install so i am a bit rusty on some terms .
Thanks a lot

So the drive names as they appear in the fstab file are not correct in the different PC. Can you boot from a USB thumb drive on the old Dell? If so, consider making a bootable USB thumb drive and select USB as first boot in the BIOS setup of the old Dell Laptop to boot from. You may also be able to press a function key at boot and select the USB thumb drive as well.

https://forums.opensuse.org/blogs/jdmcdaniel3/s-c-l-u-suse-create-live-usb-version-1-00-82/

You can make this bootable USB drive on the Laptop that works and then try it on the old Dell with the new hard drive installed. Else, you would need to use a LiveCD on the working Laptop to fix the old fstab file and perhaps the device.map, but I am not sure what the correct drive names would be.

Thank You,

On 2012-12-30 16:46, charbel89 wrote:

> Is there a way to somehow reconfigure the disk to work fine on my dell?

You may boot the disk in your new laptop, and change disk references to
work “by-label” instead. This reference will remain the same in your old
computer.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

Hi,
Thanks for your response.

Unfortunately the old laptop is not capable of usb booting.

You are spot on regarding fixing the devices. It is what i am trying to do but i am not sure what names to use and how to get those names .

When i insert into my old laptop and the error ocurs i get switched to command shell and when i check /dev there are no Hdd or sda. The name that was being used had usb-hddmanufactures name-part1 at start so by modiyfing the fstab options during install i managed to make sure it is /dev/sda1 etc… obviously those are wrong .

Is there a way to get those names and then i can use livecd to correct as you suggested.

Thanks a lot.

So beyond using a Thumb Drive, I minght think you could try something like this: How to Boot ISO Images from Your Hard Drive - Softpedia & UNetbootin - Homepage and Downloads, but I have not tried it myself.

Thank You,

You probably mean Volume Label?

when setting the partitions, click on fstab button and change to Volume Label, and add a label right?

Thanks.

Also to add, on my old laptop I select C during startup and then I had the Grub prompt.

I did ls and it showed me the disks and partitions.

They were named hd0 , hdo,msdos1, hd0, mdsdos2 etc…

would this be the name to use? if so I will need to change fstabs file and which other files as well?

Thanks

Did you try to boot with “root=/dev/sda1” kernel option?

Yes, problem /dev/sda1 is not here on old laptop. The HDD boots fine on the new laptop.

I am going to try UNetbootin as per jdmcdaniel3 advice.

On 2012-12-30 19:16, charbel89 wrote:
>
> You probably mean Volume Label?

Yes.

> when setting the partitions, click on fstab button and change to Volume
> Label, and add a label right?

Yes.

> Also to add, on my old laptop I select C during startup and then I had
> the Grub prompt.
>
> I did ls and it showed me the disks and partitions.
>
> They were named hd0 , hdo,msdos1, hd0, mdsdos2 etc…
>
> would this be the name to use? if so I will need to change fstabs file
> and which other files as well?

As volume labels? No.

I understand that you do not need to touch grub, as it is working correctly.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

I played about with Unetbootin but I had a couple of issues, It did not recognise my USB external HDD drive, and having read the manual it seems that will push the ISO to the HDD and not actually install, so pretty much back to square one really.

I tried using the labels and that did not seem to work either.

Is Linux reading disk information from the BIOS? Or does it interroagte the HDD directly? The reason I am asking is because my BIOS can only see 65GB of my 100GB HDD, however windows XP for example is pretty much happy to use the 100GB regardless of what BIOS sees.

When it waits for /dev/sda1 and it does not see it, and I eventually get to the shell, when I check the /dev I do not see /dev/disk … I can see fd0 which is my floppy, and quiet a lot of tty’s…

Is there anything that I could do to get the disk to some how be mounted or at least show up…

Thanks

On 2012-12-30 23:26, charbel89 wrote:

> I tried using the labels and that did not seem to work either.

Why not?

> Is Linux reading disk information from the BIOS? Or does it interroagte
> the HDD directly? The reason I am asking is because my BIOS can only see
> 65GB of my 100GB HDD, however windows XP for example is pretty much
> happy to use the 100GB regardless of what BIOS sees.

Linux bypasses the bios completely. However, grub has to use the bios,
there is no system loaded yet. If the bios doesn’t see the entire 100G,
then you really need a /boot partition below that limit, and a “/” on
the rest. That must be a really old bios.

> When it waits for /dev/sda1 and it does not see it, and I eventually
> get to the shell, when I check the /dev I do not see /dev/disk … I can
> see fd0 which is my floppy, and quiet a lot of tty’s…

I think you need to boot any kind of Linux and have a look at what the
kernel sees in /dev.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

Here is what I can see on the HDD when I run fdisk -l , this is when it is connected to USB on my new laptop:

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 612517 305235 83 Linux
/dev/sda2 614400 189358079 94371840 f W95 Ext’d (LBA)
/dev/sda3 189358080 195371007 3006464 82 Linux swap / Solaris
/dev/sda5 616448 42571775 20977664 83 Linux
/dev/sda6 42573824 189358079 73392128 83 Linux

I sda5 is /root and sda6 is /home

### BEGIN /etc/grub.d/00_header ###
if  -s $prefix/grubenv ]; then
  load_env
fi
set default="${saved_entry}"

if  x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if  "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if  -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if  x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if  x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if  x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  a8d2646f-a083-4d63-8b15-2f2fb355b5b7
else
  search --no-floppy --fs-uuid --set=root a8d2646f-a083-4d63-8b15-2f2fb355b5b7
fi
    font="/usr/share/grub2/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if sleep --interruptible 0 ; then
  set timeout=8
fi
### END /etc/grub.d/00_header ###


menuentry 'openSUSE 12.2' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-a8d2646f-a083-4d63-8b15-2f2fb355b5b7' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if  x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  4fc13352-7e1e-44de-9c32-a46ad232085b
    else
      search --no-floppy --fs-uuid --set=root 4fc13352-7e1e-44de-9c32-a46ad232085b
    fi
    echo    'Loading Linux 3.4.6-2.10-default ...'
    linux    /vmlinuz-3.4.6-2.10-default root=UUID=a8d2646f-a083-4d63-8b15-2f2fb355b5b7   resume=/dev/disk/by-id/usb-TOSHIBA_MK1032GAX_3BA27510321A-0:0-part3 splash=silent quiet showopts
    echo    'Loading initial ramdisk ...'
    initrd    /initrd-3.4.6-2.10-default
}


On Grub shell running ls -l

I get (hd0) , (hd0,msdos1), (hd0, msdos2), (hd0, msdos3), (hd0, msdos5), (hd0, msdos6)

msdos5 and msdos6 are shown with correct labels (root and home).
msdos1 is boot

Fstab:

LABEL=root           /                    ext4       acl,user_xattr        1 1
LABEL=boot           /boot                ext4       acl,user_xattr,nofail 1 2
LABEL=home           /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/usb-TOSHIBA_MK1032GAX_3BA27510321A-0:0-part3 swap                 swap       defaults              0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

device.map:

(hd0)    /dev/disk/by-id/usb-TOSHIBA_MK1032GAX_3BA27510321A-0:0

I am thinking that the use of usb in the drive name will change to ata. You could make this change in fstab and device.map, but once made, this copy will no longer boot from your working system.

Thank You,

This would imply drivers for HDD controller are missing in initrd. As you are apparently using USB to connect HDD on new laptop, that sounds plausible. Could you check with lsinitrd, like

bor@opensuse:~> lsinitrd /boot/initrd-3.4.11-2.16-desktop| grep ata
lib/modules/3.4.11-2.16-desktop/kernel/drivers/ata
lib/modules/3.4.11-2.16-desktop/kernel/drivers/ata/ata_generic.ko

Running the command results in:

linux@linux:/media/boot> lsinitrd ./initrd-3.4.6-2.10-default | grep ata
lib/udev/udisks-probe-ata-smart
lib/udev/ata_id
usr/lib/libatasmart.so.4.0.4
usr/lib/libatasmart.so.4

I can only see the initrd-xx-default.

It sort of makes sense.

I would have thought the name starting with usb should not make a difference, from what I have read it is just an alias to create the mapping between physical hdd and where the boot information is, which Grub uses to boot the machine.

Try recreate initrd adding ata_generic. This should cover most of the cases:

mkinitrd -m ata_generic

You still need to fix root device name, but first step is to ensure device is visible in initrd at all.