# USB not recognized even CDROM doesnot mount!

## samirkhanal

I have a gentoo box with Base system Version 1.12.4 on Intel Xeon 

I have a external USB disk for backup that used to work fine with this system. But since few days, i cannot get it to mount.

I first doubted that the drive had failed, I tried it on CentOS and it mounted correctly.

I also tried inserting my usb stick in, but no success.

Crossing my finger i tried 

mount /mnt/cdrom  # special device /dev/cdroms/cdrom0 doesnot exist.

Upon checking /dev/ there was no dir for cdroms, seems like it got wiped out

I tried 

dmesg | grep USB which returns nothing

fdisk -l also shows no /sda1  or /sdb1

I am just stuck, what am i missing?

Any help will be just great.

Thanks

Samir

----------

## button

Did you update your kernel/BIOS/hal/udev recently? Please post your emerge --info

----------

## samirkhanal

i have not touched the hal/udev/bios yet

and i don't remember doing a kernel update either.

Here is the result of emerge --info

Portage 2.1.3 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r7 i686)

=================================================================

System uname: 2.6.17-gentoo-r7 i686 Intel(R) Xeon(TM) CPU 2.40GHz

Gentoo Base System version 1.12.4

Timestamp of tree: Thu, 17 Apr 2008 12:30:11 +0000

app-shells/bash:     3.2_p17

dev-lang/python:     2.4.4-r5

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.4-r7

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.13-r3

sys-devel/libtool:   1.4.3-r4, 1.5.22

virtual/os-headers:  2.6.11-r5

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.2/share/config /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="buildpkg distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://mirrors.tds.net/gentoo http://gentoo.netnitco.net ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://gentoo.mirrors.pair.com/"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X alsa arts berkdb cairo cdr cli cracklib crypt cups dbus dri dvd dvdr eds emboss encode esd fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde ldap mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd truetype unicode vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

----------

## samirkhanal

I am stilling waiting on the reply to this post..

my udev does not emerge (update)

----------

## jcat

Monitor dmesg as you plug the USB device in.  Post the entries that are generated.

Cheers,

jcat

----------

## samirkhanal

Nothing happens when i do that

----------

## jcat

Then I'd say your usb is possible dead!

Cheers,

jcat

----------

## d2_racing

Hi, first your current installation is pretty old, profile 2006.1.

Anyway, can you boot with a recent LiveCD like Knoppix and test if your USB is actually working ?

----------

## samirkhanal

I know that the USB is broken, thats why i wanted to fix it. 

I tried do 

```
bwp4 ~ # emerge --pretend udev

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild     U ] sys-apps/coreutils-6.10-r1 [6.7-r1] USE="-vanilla%"

[ebuild  N    ] virtual/init-0

[ebuild     U ] sys-apps/baselayout-1.12.11.1 [1.12.4-r7]

[ebuild     U ] sys-apps/module-init-tools-3.4 [3.2.2-r1] USE="-old-linux%"

[ebuild  N    ] sys-fs/udev-115-r1  USE="(-selinux)"
```

i see that udev is not even installed.

and then i have issues updating the coreutils some lzma problem...

It is very important for me to fix this box without breaking it.

thanks

----------

## jcat

My point is that if nothing appears in dmesg when you plug a usb device in, and you haven't changed your kernel config recently, maybe your usb hardware is dead.

Cheers,

jcat

----------

## samirkhanal

I just found out that someone had done 

```

emerge --sync 

```

that broke and they did some workaround!

----------

## jcat

Ok, well that could explain it!

You need to install udev, and get things up to date I guess.

http://www.gentoo.org/doc/en/udev-guide.xml

Do you currently have hotplug installed?

Cheers,

jcat

----------

## samirkhanal

```
bwp4 ~ # emerge udev

Calculating dependencies... done!

>>> Verifying ebuild Manifests...

>>> Emerging (1 of 5) sys-apps/coreutils-6.10-r1 to /

 * coreutils-6.10-patches-1.1.tar.bz2 RMD160 ;-) ...                                                                                                   [ ok ]

 * coreutils-6.10-patches-1.1.tar.bz2 SHA1 ;-) ...                                                                                                     [ ok ]

 * coreutils-6.10-patches-1.1.tar.bz2 SHA256 ;-) ...                                                                                                   [ ok ]

 * coreutils-6.10-patches-1.1.tar.bz2 size ;-) ...                                                                                                     [ ok ]

 * coreutils-6.10.tar.lzma RMD160 ;-) ...                                                                                                              [ ok ]

 * coreutils-6.10.tar.lzma SHA1 ;-) ...                                                                                                                [ ok ]

 * coreutils-6.10.tar.lzma SHA256 ;-) ...                                                                                                              [ ok ]

 * coreutils-6.10.tar.lzma size ;-) ...                                                                                                                [ ok ]

 * checking ebuild checksums ;-) ...                                                                                                                   [ ok ]

 * checking auxfile checksums ;-) ...                                                                                                                  [ ok ]

 * checking miscfile checksums ;-) ...                                                                                                                 [ ok ]

 * checking coreutils-6.10.tar.lzma ;-) ...                                                                                                            [ ok ]

 * checking coreutils-6.10-patches-1.1.tar.bz2 ;-) ...                                                                                                 [ ok ]

>>> Unpacking source...

>>> Unpacking coreutils-6.10.tar.lzma to /var/tmp/portage/sys-apps/coreutils-6.10-r1/work

unpack coreutils-6.10.tar.lzma: file format not recognized. Ignoring.

>>> Unpacking coreutils-6.10-patches-1.1.tar.bz2 to /var/tmp/portage/sys-apps/coreutils-6.10-r1/work

/usr/portage/sys-apps/coreutils/coreutils-6.10-r1.ebuild: line 50: cd: /var/tmp/portage/sys-apps/coreutils-6.10-r1/work/coreutils-6.10: No such file or directory

 * Applying various patches (bugfixes/updates) ...

 *   003_all_coreutils-gentoo-uname.patch ...

 * Failed Patch: 003_all_coreutils-gentoo-uname.patch !

 *  ( /var/tmp/portage/sys-apps/coreutils-6.10-r1/work/patch/003_all_coreutils-gentoo-uname.patch )

 *

 * Include in your bugreport the contents of:

 *

 *   /var/tmp/portage/sys-apps/coreutils-6.10-r1/temp/003_all_coreutils-gentoo-uname.patch-22053.out

 *

 * ERROR: sys-apps/coreutils-6.10-r1 failed.

 * Call stack:

 *   ebuild.sh, line 1648:   Called dyn_unpack

 *   ebuild.sh, line 768:   Called qa_call 'src_unpack'

 *   ebuild.sh, line 44:   Called src_unpack

 *   coreutils-6.10-r1.ebuild, line 53:   Called epatch

 *   eutils.eclass, line 324:   Called die

 *

 * Failed Patch: 003_all_coreutils-gentoo-uname.patch!

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-apps/coreutils-6.10-r1/temp/build.log'.

 *

 * Messages for package sys-apps/coreutils-6.10-r1:

 * Failed Patch: 003_all_coreutils-gentoo-uname.patch !

 *  ( /var/tmp/portage/sys-apps/coreutils-6.10-r1/work/patch/003_all_coreutils-gentoo-uname.patch )

 *

 * Include in your bugreport the contents of:

 *

 *   /var/tmp/portage/sys-apps/coreutils-6.10-r1/temp/003_all_coreutils-gentoo-uname.patch-22053.out

 *

 * ERROR: sys-apps/coreutils-6.10-r1 failed.

 * Call stack:

 *   ebuild.sh, line 1648:   Called dyn_unpack

 *   ebuild.sh, line 768:   Called qa_call 'src_unpack'

 *   ebuild.sh, line 44:   Called src_unpack

 *   coreutils-6.10-r1.ebuild, line 53:   Called epatch

 *   eutils.eclass, line 324:   Called die

 *

 * Failed Patch: 003_all_coreutils-gentoo-uname.patch!

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-apps/coreutils-6.10-r1/temp/build.log'.

 *

```

I tried emerging udev

I get an error with lzma not being in the system.

also 

```
bwp4 ~ # emerge --pretend lzma-utils

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] app-arch/lzma-utils-4.32.5
```

and 

```
bwp4 ~ # emerge --pretend lzma

These are the packages that would be merged, in order:

Calculating dependencies \

!!! All ebuilds that could satisfy "lzma" have been masked.

!!! One of the following masked packages is required to complete your request:

- app-arch/lzma-4.57 (masked by: ~x86 keyword)

- app-arch/lzma-4.27 (masked by: ~x86 keyword)

- app-arch/lzma-4.43 (masked by: ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or

refer to the Gentoo Handbook.
```

You would have probably guessed what's wrong.  :Smile: 

Thanks

----------

## jcat

I would say that the priority is to get your system into a sane state (ie  all up date, on the correct profile etc), then worry about your usb issue.

I would do another 

```
emerge --sync
```

 then 

```
emerge -1av portage
```

 and  *Quote:*   

> emerge -uDNpv world

  see what needs updating and then go for it.  Don't forget to update any overlays as well if you use layman or anything like that.

Once you're up to date you need to make sure you're using one of the recent profiles.  Then update world again.

Because you're still on an old profile, I'm guessing that you may have a large amount of updates to do (which may prove slightly tricky).  Look out for any potential tricky major version updates like python etc.

If you need help, let us know  :Smile: 

Cheers,

jcat

----------

## Polynomial-C

 *jcat wrote:*   

>  *Quote:*   emerge -uDNpv world 

  I'd say, replace this with 

```
emerge -uDaNv system && emerge -uDaNv world
```

 as this updates the toolchain and other important system-packages first (which can prevent some problems).

----------

## d2_racing

In fact , maybe you should run only this, because if you update the toolchain you can break something else :

```

# emerge e system && emerge -e world

```

----------

## jcat

He's already on gcc-4.1.1, so a minor version upgrade to gcc-4.1.2 shouldn't require a toolchain rebuild.

Or am I wrong?!   :Smile: 

Cheers,

jcat

----------

## d2_racing

He is using : 

```
default-linux/x86/2006.1/desktop
```

So, maybe an upgrade to 2008.0/desktop and after that he run the emerge -e system and emerge -e world, just to be sure to have a list consistant package.

----------

## samirkhanal

How do i upgrade the profile to 2008.0/desktop ?

----------

## d2_racing

Hi, you need to read this : http://www.gentoo.org/doc/en/gentoo-upgrading.xml

----------

## samirkhanal

I did an emerge --sync

and suggested i do a emerge portage

Now i get message " !!!ARCH is not set ... Are you missing the /etc/make.profile Symlink?" when i try to emerge portage.

What is the next step?

----------

## samirkhanal

I did 

eselsect profile set 7

and emerge worked

----------

## samirkhanal

I did 

```
emerge --sync
```

```
eselect profile set 7
```

should i do an emerge portage 

when i do 

emerge --pretend portage, it says

```

[ebuild     U ] sys-apps/portage-2.1.4.5 [2.1.3.9] 

*** Portage will stop merging at this point and reload itself,

    then resume the merge.

[ebuild     U ] sys-apps/sandbox-1.2.18.1-r2 [1.2.17] 

```

is it ok to emerge at this point?

----------

## samirkhanal

Problem solved!

I updated the portage

```
emerge portage

emerge lzma-utils

emerge coreutils

emerge udev

```

and a reboot

and everything is perfect now.

dmesh also works.

Thanks every one for their help, i appreciate that very much.  :Smile: 

----------

