Register
It is currently Mon May 21, 2018 10:33 am

Recovering from a lost root password


All times are UTC


Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 PostPosted: Fri Jun 20, 2008 5:12 am   
Linux Guru
User avatar

Joined: Wed Jul 07, 2004 3:30 am
Posts: 7400
Location: Central Montana & Eastern Tennessee
I'll practice on something else for a while. this has bummed me out. Thanks all for your advice and encouragement, I'll come back to this in a couple of weeks maybe and see if things change for me .... between this and the sidux mess, I'm just tired of it all, I think I'll just use Puppy and Knoppix for a while. Thanks again, JP

_________________
BYOBox - Dell E6400 7w/MX 17
BrewBox - D610 7w/antix17 base
PlayBox - antiX 17 Testing


Top
 Profile  
 PostPosted: Sat Jun 21, 2008 4:29 am   
Linux Guru
User avatar

Joined: Fri Aug 29, 2003 8:37 pm
Posts: 4557
ummm... the syntax of mount is:
mount /dev/devicenode /mnt/mountpoint

ALSO didn't linux switch from hdx to sdx?
so wouldn't it be
mount /dev/sda1 /mnt/hda1
?

also, don't you have to bind /dev and /proc to the chroot before you mount it?

_________________
Gentoo x86-64 4.11
Debian at work


Top
 Profile WWW  
 PostPosted: Sat Jun 21, 2008 4:43 am   
Sr. Member
User avatar

Joined: Sat Apr 19, 2003 6:08 am
Posts: 1544
nukes wrote:
ummm... the syntax of mount is:
mount /dev/devicenode /mnt/mountpoint

ALSO didn't linux switch from hdx to sdx?
so wouldn't it be
mount /dev/sda1 /mnt/hda1
?

also, don't you have to bind /dev and /proc to the chroot before you mount it?

yep, and that's what I suggested in JP's other related thread

/dev/sdxy is for SCSI, SATA, and drives/devices coming of the usb bus - AFAIK, /dev/hdxy is still valid for an IDE drive


Top
 Profile WWW YIM  
 PostPosted: Sat Jun 21, 2008 4:05 pm   
Linux Guru
User avatar

Joined: Fri Aug 29, 2003 8:37 pm
Posts: 4557
depends if the kernel is using libata... they started doing that for ATA drives in 2.6.19 iirc. So depends on the kernel you're running and it's configuration. Look through dmesg and that will tell you.

_________________
Gentoo x86-64 4.11
Debian at work


Top
 Profile WWW  
 PostPosted: Mon Jun 23, 2008 11:19 pm   
Moderator
User avatar

Joined: Tue Dec 02, 2003 7:48 pm
Posts: 1724
Location: Georgia
well... if you type mount without any parameters... you get a list of devices/blocks that are mounted (or a read out of /etc/mtab)

if you give it just one parameter, it looks for the rest of the info in /etc/fstab, which is why, typically, you end up with the error "xyz is not found in /etc/fstab or in /etc/mtab"

_________________
server: Arch Linux - Kernel 2.6.33-ARCH
Lenovo T60 StinkPad: Arch Linux - Kernel 3.10.10-1-ARCH
VirtualBox 4.2.18 Hosted on MacOS X (10.7.5) Mountain Lion: Arch Linux - Kernel 3.10.10-1-ARCH


Top
 Profile  
 PostPosted: Tue Jun 24, 2008 1:39 am   
Linux Guru
User avatar

Joined: Sat Apr 03, 2004 12:39 am
Posts: 12380
Location: Clinton Township, Michigan
jbsnake wrote:
well... if you type mount without any parameters... you get a list of devices/blocks that are mounted (or a read out of /etc/mtab)

if you give it just one parameter, it looks for the rest of the info in /etc/fstab, which is why, typically, you end up with the error "xyz is not found in /etc/fstab or in /etc/mtab"


Correct! I rarely mount manually with just one parameter unless the entry is in my fstab with the "auto" parameter, in which case, I may use a quick mounting tool such as kuikdisk or something like that.

From the command line, I am more likely to use
Code:
sudo mount /dev/sda5 /media/disk1part5
or something similar.

_________________
Brian Masinick
Distros: MX-17, antiX, Debian


Top
 Profile WWW YIM  
 PostPosted: Sun Mar 04, 2012 10:18 pm   
Linux Guru
User avatar

Joined: Wed Jul 07, 2004 3:30 am
Posts: 7400
Location: Central Montana & Eastern Tennessee
Once again, I've hit a brick wall with this thing. I don't know how my root password got left in the dust, it's just disappeared :!: It no longer works - I use the same root password for both Linux instances on the same hard drive. One is LMDE and the other is antiX-base, and I'm trying to get the root password back onto the LMDE.

I'm using an antiX M8.5 live CD to put in a new root password. Here's the output from my terminal:
Code:
[email protected]:~$ su root
Password:
[email protected]:/home/demo# fdisk -l

Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00061915

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1           7       51200   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/hda2               7         198     1536000   83  Linux
Partition 2 does not end on cylinder boundary.
/dev/hda3   *         198        2310    16964608   83  Linux
/dev/hda4   *        2310        4861    20486144   83  Linux
[email protected]:/home/demo# cd /mnt
[email protected]:/mnt# ls
hda1  hda2  hda3  hda4
[email protected]:/mnt# mkdir /mnt/mountplace
[email protected]:/mnt# mount /dev/hda1 /mnt/mountplace
[email protected]:/mnt# chroot /mnt/mountplace /bin/bash
chroot: cannot run command `/bin/bash': No such file or directory
[email protected]:/mnt# chroot /mnt/mountplace
chroot: cannot run command `/bin/bash': No such file or directory

_________________
BYOBox - Dell E6400 7w/MX 17
BrewBox - D610 7w/antix17 base
PlayBox - antiX 17 Testing


Top
 Profile  
 PostPosted: Sun Mar 04, 2012 10:28 pm   
Linux Guru
User avatar

Joined: Wed Jul 07, 2004 3:30 am
Posts: 7400
Location: Central Montana & Eastern Tennessee
Never mind the previous post :!: I figured out what was wrong :oops: :oops: :oops: Note to self - make sure you aren't trying to mount the swap partition instead of the linux partition you want access to :nono: :doh:
:rofl: :rofl:

_________________
BYOBox - Dell E6400 7w/MX 17
BrewBox - D610 7w/antix17 base
PlayBox - antiX 17 Testing


Top
 Profile  
 PostPosted: Sat Mar 24, 2012 10:55 pm   
. . . .
User avatar

Joined: Mon Apr 21, 2003 3:56 pm
Posts: 8309
Pesky swap partitions... for my swap, I use a virtual partition made in system RAM. Just kidding!

_________________
eMachines T5246 AMD 64 X2 w/Ubuntu Mate 16.04.4
EeePC 900A w/Antix 16.2 32 bit
Dell Inspiron 1545 w/Neptune 5.1


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


Powered by phpBB © 2012 phpBB Group
© 2003 - 2012 USA LINUX USERS GROUP