LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2006, 03:06 PM   #1
PaulGoold
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Rep: Reputation: 0
Install Linux via usb easy IDE connection


Is there any way I can install linux onto my laptop's (its an HP zt3010us)harddrive that is connected to my HP desktop via USB and easy IDE connector.

My laptops cd is dead, does not have a floppy and I wondered if there is a way I can copy from the booted CD in my desktop onto the laptop's hard drive and reinstall into the laptop.

I tried knoppix tohd= /media/sda1 (which is what the hard drive is shown as) but it does not allow it to be mounted during the boot process and kicks up a list of errors.

PLEASE HELP.
 
Old 09-15-2006, 04:11 PM   #2
abcdefghij
LQ Newbie
 
Registered: Nov 2003
Location: Germany
Distribution: Debian
Posts: 26

Rep: Reputation: 15
Can you give a hint what this "easy IDE connector" is? From your posting it seems to be some kind of adapter... can you give details?

Also, you said it "kicks up a list of errors"; can you give details about these errors?
 
Old 09-15-2006, 04:32 PM   #3
PaulGoold
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
IDE Connector

The error messages were things like 'unable to mount, wrong filesystem'and the easy IDE connector is an adapter that lets you 'connect to ATA/ATAPI IDE interface devices such as hard drives via USB 2.0 without any ID or jumper setting requirement'

I hope this helps?
 
Old 09-15-2006, 05:31 PM   #4
abcdefghij
LQ Newbie
 
Registered: Nov 2003
Location: Germany
Distribution: Debian
Posts: 26

Rep: Reputation: 15
Ah ok... I somehow didn't grasp your setup , but now it seems clear to me: you have removed the hard drive from the laptop and connected it to your desktop PC with that adapter, right?

So, if you now boot the PC with knoppix, it should boot normally (I think you don't need to use the tohd= option). When Knoppix is fully booted, you should have a look at the file "/etc/fstab" (eg. open a terminal/konsole window and type "less /etc/fstab"). AFAIK on boot this file is filled with entries for all detected partitions.

You can then also look at the boot messages (run "dmesg" in a terminal window) to see which hard drives were detected, and then use cfdisk (eg. "cfdisk /dev/sda") to partition one hard drive. This way, you can also see if Knoppix has detected your laptop drive correctly (with correct size, and with existing partitions).

[aside note] under Linux, /dev/sda is the first SCSI device (and for historical reasons or whatever, USB Mass Storage devices and SATA devices also appear under this namespace). /dev/sdb is the second SCSI/USB/SATA... device, and so on.
/dev/sda1 is the first partition on /dev/sda; so to use sda1, the hard disk must be partitioned already. You can only "mount" _partitions_, not whole drives. And the partition must be formatted with a file system that is recognized by Linux. Errors like "unable to mount, wrong filesystem" are a hint that Linux tried to mount the whole disk (instead of one partition), or that the partition was not formatted, or that the file system on the partition was not detected/supported (AFAIK this might happen if NTFS is used, as not all Linux distros support NTFS), or it might mean that the disk was somehow not detected correctly... [end aside note]

I'm not sure what "ease of use" the Knoppix installer offers today; but if you start it, it will probably ask you for a destination device. There you can probably enter /dev/sda , and then the installer will probably offer to partition the drive; or if you have already created a partition, you can enter its identifier (eg. /dev/sda1).

So, can you check if Knoppix detects your USB-connected drive at all? And if it does, can you try to run the Knoppix installer and install to that drive? Or can you run cfdisk (or another partition utility) on that drive? If it fails, can you post the error messages you get?
 
Old 09-16-2006, 06:39 AM   #5
PaulGoold
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Laptop hard drive

I ran knoppix - installer and went through the configuration stages and partitioned the hard drive (/dev/sda2). The installer copied all of the files successfully but during the updating /etc/fstab there were 2 error messages. The first started: could not open /mnt/hdinstall/home/myusername/ and I missed the rest as it then displayed the second: could not open /mnt/hdinstall/sbin/hotplug - knoppix: no such file or directory

It then advised me that 'Successfully installed to HD' and booted into knoppix via the CD. I then viewed the HD icon (hard disk sda2) on the desktop and it said: could not mount device. The reported error was: mount: wrong fs type. bad option. bad superblock on /dev/sda2 missing codepage or other error

Are we close do you think?
 
Old 09-16-2006, 07:27 AM   #6
abcdefghij
LQ Newbie
 
Registered: Nov 2003
Location: Germany
Distribution: Debian
Posts: 26

Rep: Reputation: 15
Quote:
Are we close do you think?
I'm not quite sure what causes the problems. The two error messages seem to indicate that it couldn't access the target partition at all...

Can you try this:
- boot Knoppix
- in terminal, run "cfdisk /dev/sda"
- make sure that the partitions are set up correctly, and have good partition types (IIRC it should be type 83 for the Linux partition)
- after exiting cfdisk, format the partition manually with "mke2fs /dev/sda2"
- create a mount point (for testing) with "mkdir /mnt/mytest"
- mount the partition manually with "mount -t ext2 /dev/sda2 /mnt/mytest"
- see if you can access the mounted partition (with "ls /mnt/mytest")
- see if the free space is correct (with "df -h /mnt/mytest")
- you can now also try to use the file manager (konqueror or whatever) to access the directory /mnt/mytest and see if you can create files there, copy files, and so on...

If there are errors, can you post them?
Otherwise, if all that works, you could try to run the installer again.
 
Old 09-16-2006, 07:56 AM   #7
PaulGoold
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
When I run cfdisk I get this message:

FATAL ERROR: Cannot open disk drive
Press any key to exit cfdisk

I guess this may be a big clue!

Thanks,

Paul
 
Old 09-16-2006, 08:41 AM   #8
abcdefghij
LQ Newbie
 
Registered: Nov 2003
Location: Germany
Distribution: Debian
Posts: 26

Rep: Reputation: 15
Quote:
I guess this may be a big clue!
Yes, indeed

This might indicate either that the device was not detected correctly, or that the permissions are wrong, or that some other thing has failed...

Can you try "fdisk /dev/sda"? fdisk is another partition utility, which might give more information.
Can you post the result of "ls -l /dev/sda"?
What does "dmesg | grep -C 3 sda" say?

I still have no clue what exactly is the cause of the problems. It seems like the device is detected at least partially... Is it possible that your USB-IDE adapter requires special drivers to really work?
 
Old 09-16-2006, 08:52 AM   #9
PaulGoold
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
dmesg | grep -C 3 sda says:brw-rw---- 1 rootdisk 8, 0 SEP 16 11:51 /dev/sda

fdisk /dev/sda says: unable to open /dev/sda

What does "dmesg | grep -C 3 sda" say?

ieee1394: Host added: ID:BUS[0-00:1023] GUID[0011d800002c6426]
Vendor: IC25N060 Model: ATMR04-0 Rev: MO3O
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
sda: Write Protect is off
sda: Mode Sense: 00 14 00 00
sda: assuming drive cache: write through
SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
sda: Write Protect is off
sda: Mode Sense: 00 14 00 00
sda: assuming drive cache: write through
sda:<5> Vendor: Generic Model: USB SD Reader Rev: 1.00
Type: Direct-Access ANSI SCSI revision: 00
sd 1:0:0:0: Attached scsi removable disk sdb
Vendor: Generic Model: USB CF Reader Rev: 1.01
--
Type: Direct-Access ANSI SCSI revision: 00
sd 1:0:0:3: Attached scsi removable disk sde
usb-storage: device scan complete
sda1 sda2
sd 0:0:0:0: Attached scsi disk sda
usb-storage: device scan complete
Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon!
Unable to identify CD-ROM format.
--
fuse init (API version 7.6)
hw_random: RNG not detected
device-mapper: 4.6.0-ioctl (2006-02-17) initialised: dm-devel@redhat.com
Adding 1028148k swap on /dev/sda1. Priority:-1 extents:1 across:1028148k
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
NET: Registered protocol family 17
 
Old 09-16-2006, 09:36 AM   #10
abcdefghij
LQ Newbie
 
Registered: Nov 2003
Location: Germany
Distribution: Debian
Posts: 26

Rep: Reputation: 15
Looks like there are several SCSI/SATA/USB devices attached (at least sda, sdb and sde). Seem to be a hard disk, a CF reader, and maybe a CD drive.
But the first part from the dmesg output seems to indicate that sda is the IC25N060 hard drive with 60GB - could that be your laptop hard disk?
Also, it seems that Knoppix has found 1GB of swap space on sda1 - maybe from a previous installation...

Anyway, the disk seems to be detected correctly; maybe it's a permission problem. Did you run fdisk/cfdisk as root? To do that, open a terminal, enter "sudo -s" and notice that the "prompt" (the short text that prompts you to enter something) now has a # in it... After the "sudo -s", you should run "fdisk /dev/hda" again.

If that doesn't help, I'm a bit out of ideas :/ but you could attach the whole output from "dmesg" so I can look for strange things.
 
Old 09-16-2006, 09:50 AM   #11
PaulGoold
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
I ran sudo -s and reran fdisk and this is the message:

The number of cylinders for this disk is set to 7296.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)


Should I run cfdisk again?
 
Old 09-16-2006, 09:55 AM   #12
PaulGoold
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
cfdisk output

cfdisk 2.12r

Disk Drive: /dev/sda
Size: 60011642880 bytes, 60.0 GB
Heads: 255 Sectors per Track: 63 Cylinders: 7296
Name Flags Part Type FS Type [Label] Size (MB)
------------------------------------------------------------------------------
sda1 NC Primary Linux swap / Solaris 1052.84
sda2 Boot Primary Linux ext3 58958.81

[Bootable] [ Delete ] [ Help ] [Maximize] [ Print ]
[ Quit ] [ Type ] [ Units ] [ Write ]

I hope this helps?
 
Old 09-16-2006, 09:57 AM   #13
abcdefghij
LQ Newbie
 
Registered: Nov 2003
Location: Germany
Distribution: Debian
Posts: 26

Rep: Reputation: 15
Seems like sudo did the trick! The message from fdisk just warns you that old software (old Linux versions, DOS, OS/2) might have problems with the size of your disk - nothing to worry about.

So, yes, you can run cfdisk again, and go on with the other steps (make sure the partitions are all set up correctly, run mke2fs, and so on). Run all these things in the "root shell" you got with sudo. And the Knoppix installer should be run from that root shell as well. If you don't know how to run the installer from there, you can also just change the permissions for the drive (with "chmod a+rw /dev/sda*"). Then all applications under Knoppix should be able to access the drive.
 
Old 09-16-2006, 09:59 AM   #14
abcdefghij
LQ Newbie
 
Registered: Nov 2003
Location: Germany
Distribution: Debian
Posts: 26

Rep: Reputation: 15
The partitions seem to be ok. You can now go on with mke2fs and so on.
 
Old 09-16-2006, 10:45 AM   #15
PaulGoold
LQ Newbie
 
Registered: Aug 2006
Posts: 14

Original Poster
Rep: Reputation: 0
I've done all the mke2fs actions and everything seems fine. Do I need to re-run installer to get Knoppix onto the Hd?

Also, if I do get it installed and remove and put into my laptop, should it boot as normal?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Easy-use, easy-install, fast, minimal KDE distro? lukeprog Linux - Distributions 8 09-08-2007 05:21 PM
Easy IDE (usb cable connecting external device) monkster Linux - Hardware 5 09-09-2006 02:49 PM
How to install IDE to USB converter? Barca Linux - Hardware 5 09-12-2005 04:49 PM
linux compatible USB-IDE adapter? jago25_98 Linux - Hardware 1 11-23-2004 09:03 PM
Easy Linux Install question shock-n-awe Linux - Software 3 11-01-2003 11:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration