Mount a HD from the live DVD?

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
Post Reply
frogprince
Posts: 67
Joined: Mon Jul 10, 2017 9:50 pm

Mount a HD from the live DVD?

Post by frogprince »

Is there a way to mount and edit files on a HD from the GBD live DVD? I was playing with slim and now cannot boot the system, even into text mode. I know what I did, and can reverse it, if only I had Caja or command line access to the HD. The live DVD won't let me mount the HD.
Vas you efer in Zinzinnati? Asus F1A75-M, AMD A8-3870 APU, 6 GB DDR3/120 GB SSD, GeForce 210, missing front drive panel just like its owner.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Mount a HD from the live DVD?

Post by ASX »

frogprince wrote:Is there a way to mount and edit files on a HD from the GBD live DVD?
Of course yes, generally speaking.

The the next question is about what filesystem do you want to mount.
GhostBSD/FreeBSD has limited filesystem support: can mount UFS filesystem, FAT filesystem (msdosfs), NTFS (using fuse-ntfs and ntfs-3g), ZFS, and others.

A limit of the LiveDVD is that you can't create a mountpoint under '/', you will have to use something under "/mnt", or under "/home/<user>".

If you need help, boot from a live DVD, and post here the output of

Code: Select all

gpart show -p
that will allow us to see the exect partition layout and provide further instructions.

Alternatively, check the "mount" manpage. ;)
frogprince
Posts: 67
Joined: Mon Jul 10, 2017 9:50 pm

Re: Mount a HD from the live DVD?

Post by frogprince »

ASX: thanks for your patient response. Bottom line: it worked.

As documentation for anyone else attempting this, I did this:

Code: Select all

root@ghostbsd:/home/ghostbsd # gpart show -p
=>       34  312581741    ada0  GPT  (149G)
         34       2048  ada0p1  bios-boot  (1.0M)
       2082          6          - free -  (3.0K)
       2088  308432896  ada0p2  freebsd-ufs  (147G)
  308434984    4136960  ada0p3  freebsd-swap  (2.0G)
  312571944       9831          - free -  (4.8M)

=>     9  947047  cd0  MBR  (1.8G)
       9  947047       - free -  (1.8G)

=>     9  947047  iso9660/GhostBSD  MBR  (1.8G)
       9  947047                    - free -  (1.8G)

=>      63  15695808    da5  MBR  (7.5G)
        63  15695808  da5s1  !12  [active]  (7.5G)

root@ghostbsd:/home/ghostbsd # 
root@ghostbsd:/home/ghostbsd # mount /dev/ada0p2 /dev
mount: /dev/ada0p2: R/W mount of / denied. Filesystem is not clean - run fsck. Forced mount will invalidate journal contents: Operation not permitted
root@ghostbsd:/home/ghostbsd # fsck -y /dev/ada0p2
** /dev/ada0p2

USE JOURNAL? yes

** SU+J Recovering /dev/ada0p2
** Reading 33554432 byte journal from inode 4.

RECOVER? yes

** Building recovery table.
** Resolving unreferenced inode list.
** Processing journal entries.

WRITE CHANGES? yes

** 24 journal records in 1536 bytes for 50.00% utilization
** Freed 0 inodes (0 dirs) 0 blocks, and 0 frags.

***** FILE SYSTEM MARKED CLEAN *****
root@ghostbsd:/home/ghostbsd # mount -w /dev/adaop2 /home/ghostbsd
My problem was initiated by an attempt to change the slim login screen.
I cut out the file background.png, and replaced it with another labelled
background.jpg. When I attempted to reboot, slim would not run. But once
I mounted the drive as above, I was able to open Caja, cut and paste it
back in, and reboot perfectly.

I assume that any replacement image for slim MUST be labelled background.png,
and truly be a png image. If I bork the system again, I now know how to fix it.

Thanks again!
Vas you efer in Zinzinnati? Asus F1A75-M, AMD A8-3870 APU, 6 GB DDR3/120 GB SSD, GeForce 210, missing front drive panel just like its owner.
Post Reply