<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create DAT file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555881#M60221</link>
    <description>&lt;!--!*#--&gt;&amp;gt; # gzip -d ramdisk.dat&lt;BR /&gt;&amp;gt; gzip: ramdisk.dat: unknown suffix -- ignored&lt;BR /&gt;&lt;BR /&gt;      man gzip&lt;BR /&gt;&lt;BR /&gt;You could rename the file, or you could feed&lt;BR /&gt;it in from stdin.&lt;BR /&gt;&lt;BR /&gt;      gzip -dc &amp;lt; ramdisk.dat &amp;gt; ramdisk2.dat</description>
    <pubDate>Wed, 30 Dec 2009 22:28:56 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2009-12-30T22:28:56Z</dc:date>
    <item>
      <title>Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555877#M60217</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;Howto compress files to *.dat file?&lt;BR /&gt;&lt;BR /&gt;For example, I can decompress files from a ramdisk.dat using 7-Zip, but howto compress back to *.dat after changes?</description>
      <pubDate>Mon, 28 Dec 2009 16:43:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555877#M60217</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2009-12-28T16:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555878#M60218</link>
      <description>".dat" is a very generic file extension, meaning something like "some special data, only the appropriate tools are expected to make sense of this". So it would be kind of important to know more about the context: where exactly did you get this file from?&lt;BR /&gt;&lt;BR /&gt;Since you placed this question into Linux section of this forum, I assume this might be something Linux-related. In this case, the name "ramdisk.dat" suggests this might be a Linux boot-time initrd or initramfs (INITial Ram Disk/ RAM File System), or something else.&lt;BR /&gt;&lt;BR /&gt;Initrd and initramfs are similar in purpose, but very different in structure. Initrd is a GZIP compressed disk image that contains a filesystem of some type: the type must match what's available in the kernel that is going to use it. &lt;BR /&gt;&lt;BR /&gt;Depending on the type of the filesystem, you might be able to uncompress the file with gunzip and then mount it as a disk image in Linux: that would allow making changes to the disk image, sort of like if it was an USB stick or other removable media. &lt;BR /&gt;&lt;BR /&gt;Some special-purpose (high-compression) filesystems won't allow write access: these filesystems must be "built" using a special tool, similar to creating .ISO images with the mkisofs/genisoimage command. &lt;BR /&gt;&lt;BR /&gt;So if it's an initrd-style file, it will be necessary to identify the filesystem type, or find some documentation that lists the correct type.&lt;BR /&gt;&lt;BR /&gt;Initramfs, on the other hand, is simply a GZIP compressed "cpio" archive. One reason for its design was to avoid the complexity of initrd.&lt;BR /&gt;&lt;BR /&gt;The Linux kernel documentation includes the procedures for extracting initramfs files and creating new ones:&lt;BR /&gt;&lt;A href="http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt" target="_blank"&gt;http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Googling for "ramdisk.dat" finds various targets, like Acronis TrueImage or Ultimate Boot CD. If your question is related to customizing one of these for your environment, please say so: we can neither read your mind nor take a peek into your system to find out what you're doing.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 29 Dec 2009 00:10:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555878#M60218</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-12-29T00:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555879#M60219</link>
      <description>if you use the command 'file &lt;FILE.DAT&gt;' it will tell you what the actual format of that file is, so you can then recreate the file using the same compression method as the 'file' command told you it was.&lt;/FILE.DAT&gt;</description>
      <pubDate>Tue, 29 Dec 2009 09:28:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555879#M60219</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2009-12-29T09:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555880#M60220</link>
      <description># file -s ramdisk.dat&lt;BR /&gt;ramdisk.dat: gzip compressed data, was "ramdisk.dat.initrd", from FAT filesystem (MS-DOS, OS/2, NT), last modified: Mon Nov 10 02:00:20 2008&lt;BR /&gt;&lt;BR /&gt;# file -i ramdisk.dat&lt;BR /&gt;ramdisk.dat: application/x-gzip&lt;BR /&gt;&lt;BR /&gt;I've tried first to uncompress under linux using gzip, but it doesn't work:&lt;BR /&gt;&lt;BR /&gt;# gzip -d ramdisk.dat&lt;BR /&gt;gzip: ramdisk.dat: unknown suffix -- ignored&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Dec 2009 19:29:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555880#M60220</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2009-12-30T19:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555881#M60221</link>
      <description>&lt;!--!*#--&gt;&amp;gt; # gzip -d ramdisk.dat&lt;BR /&gt;&amp;gt; gzip: ramdisk.dat: unknown suffix -- ignored&lt;BR /&gt;&lt;BR /&gt;      man gzip&lt;BR /&gt;&lt;BR /&gt;You could rename the file, or you could feed&lt;BR /&gt;it in from stdin.&lt;BR /&gt;&lt;BR /&gt;      gzip -dc &amp;lt; ramdisk.dat &amp;gt; ramdisk2.dat</description>
      <pubDate>Wed, 30 Dec 2009 22:28:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555881#M60221</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-12-30T22:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555882#M60222</link>
      <description>Thx, but howto decompress files from ramdisk2.dat or mount it?</description>
      <pubDate>Thu, 31 Dec 2009 01:31:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555882#M60222</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2009-12-31T01:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555883#M60223</link>
      <description>&lt;!--!*#--&gt;&amp;gt; Thx, but howto decompress files from&lt;BR /&gt;&amp;gt; ramdisk2.dat or mount it?&lt;BR /&gt;&lt;BR /&gt;How did you make the thing?  How should we&lt;BR /&gt;know more about what's in it than you do?&lt;BR /&gt;&lt;BR /&gt;      "mount -o loop [...]"?</description>
      <pubDate>Thu, 31 Dec 2009 06:23:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555883#M60223</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-12-31T06:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555884#M60224</link>
      <description>I've done what u suggested:&lt;BR /&gt;&lt;BR /&gt;# gzip -dc &amp;lt; ramdisk.dat &amp;gt; ramdisk2.dat&lt;BR /&gt;&lt;BR /&gt;and I'd like to get (mount) all files from ramdisk2.dat.&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Dec 2009 12:43:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555884#M60224</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2009-12-31T12:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555885#M60225</link>
      <description>Please run "file ramdisk2.dat" to try and identify the content inside the compression.&lt;BR /&gt;&lt;BR /&gt;If it says just "data", that means the "file" command cannot identify it. If it says something like "cpio archive", it's most likely an initramfs: it cannot be mounted, but you can use the "cpio" command to extract (and later re-package) it: see my previous answer for a link to instructions.&lt;BR /&gt;&lt;BR /&gt;If your Linux distribution has "fstyp" or "fsstat" available, you can try these commands too:&lt;BR /&gt;&lt;BR /&gt;fstyp ramdisk2.dat&lt;BR /&gt;fsstat -t ramdisk2.dat&lt;BR /&gt;&lt;BR /&gt;If the ramdisk2.dat is a filesystem image, either of these commands might be able to identify the filesystem type used in the image. That would help a lot in selecting the proper tools for modifying/rebuilding the file.&lt;BR /&gt;&lt;BR /&gt;If it is a filesystem image, it can be mounted like this if the filesystem type is supported by your current Linux kernel:&lt;BR /&gt;&lt;BR /&gt;mkdir -p /mnt/ramdisk&lt;BR /&gt;mount -o loop,rw ramdisk2.dat /mnt/ramdisk&lt;BR /&gt;&lt;BR /&gt;If the filesystem won't support read-write access (cramfs, squashfs or similar), the mount command may fail. You may have to mount it read-only instead:&lt;BR /&gt;&lt;BR /&gt;mount -o loop,ro ramdisk2.dat /mnt/ramdisk&lt;BR /&gt;&lt;BR /&gt;If the mount command is successful, then you can view /proc/mounts to identify the filesystem type.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Thu, 31 Dec 2009 14:07:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555885#M60225</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-12-31T14:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555886#M60226</link>
      <description>thx, &lt;BR /&gt;&lt;BR /&gt;# fstyp ramdisk2.dat&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;# fstat ramdisk2.dat&lt;BR /&gt;USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME&lt;BR /&gt;&lt;BR /&gt;# mkdir -p /mnt/ramdisk&lt;BR /&gt;# mount -o loop,rw ramdisk2.dat /mnt/ramdisk&lt;BR /&gt;mount: you must specify the filesystem type&lt;BR /&gt;&lt;BR /&gt;# mount -o loop,ro ramdisk2.dat /mnt/ramdisk&lt;BR /&gt;mount: you must specify the filesystem type&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Dec 2009 22:29:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555886#M60226</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2009-12-31T22:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555887#M60227</link>
      <description>using tar seems to work well:&lt;BR /&gt;&lt;BR /&gt;# tar xvzf ramdisk.dat -C /mnt/ramdisk&lt;BR /&gt;&lt;BR /&gt;# ls -l /mnt/ramdisk&lt;BR /&gt;total 24&lt;BR /&gt;drwxr-xr-x  2 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current   1024 Aug 15  2007 bin&lt;BR /&gt;drwxr-xr-x  2 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 dev&lt;BR /&gt;drwxr-xr-x  7 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 etc&lt;BR /&gt;-rwxr-xr-x  1 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    272 Aug 14  2007 init&lt;BR /&gt;drwxr-xr-x  3 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current   2048 Aug 15  2007 lib&lt;BR /&gt;drwxr-xr-x  2 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 mnt&lt;BR /&gt;drwxr-xr-x  2 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 proc&lt;BR /&gt;drwxr-xr-x  2 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 sbin&lt;BR /&gt;drwxr-xr-x  2 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 sys&lt;BR /&gt;drwxrwxr-x  2 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 tmp&lt;BR /&gt;drwxr-xr-x  3 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 usr&lt;BR /&gt;drwxr-xr-x  2 root  &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; current    512 Aug 15  2007 var&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Dec 2009 22:35:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555887#M60227</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2009-12-31T22:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555888#M60228</link>
      <description>It's quite interesting that tar with this file works only under freeBSD, it doesn't work under linux:&lt;BR /&gt;&lt;BR /&gt;# tar xvzf ramdisk.dat -C /mnt/ramdisk&lt;BR /&gt;tar: This does not look like a tar archive&lt;BR /&gt;tar: Skipping to next header&lt;BR /&gt;tar: Error exit delayed from previous errors&lt;BR /&gt;</description>
      <pubDate>Sat, 02 Jan 2010 23:56:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555888#M60228</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2010-01-02T23:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555889#M60229</link>
      <description>&lt;!--!*#--&gt;&amp;gt; It's quite interesting that tar with this&lt;BR /&gt;&amp;gt; file works only under freeBSD, it doesn't&lt;BR /&gt;&amp;gt; work under linux: &lt;BR /&gt;&lt;BR /&gt;It _might_ be interesting if we knew which&lt;BR /&gt;"tar" programs were involved.&lt;BR /&gt;&lt;BR /&gt;      tar --version&lt;BR /&gt;&lt;BR /&gt;(And if we knew that you were working with&lt;BR /&gt;the same data in both cases.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; # tar xvzf ramdisk.dat -C /mnt/ramdisk&lt;BR /&gt;&lt;BR /&gt;Probably not where I'd put something other&lt;BR /&gt;than a mount point for a file system, but&lt;BR /&gt;it's your system.</description>
      <pubDate>Sun, 03 Jan 2010 00:23:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555889#M60229</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-01-03T00:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555890#M60230</link>
      <description>There is exact the same file and mount points on both systems are OK.&lt;BR /&gt;&lt;BR /&gt;freeBSD:&lt;BR /&gt;# tar --version&lt;BR /&gt;bsdtar 2.2.5 - libarchive 2.2.4&lt;BR /&gt;&lt;BR /&gt;Debian Lenny:&lt;BR /&gt;# tar --version&lt;BR /&gt;tar (GNU tar) 1.20&lt;BR /&gt;Copyright (C) 2008 Free Software Foundation, Inc.&lt;BR /&gt;License GPLv3+: GNU GPL version 3 or later &amp;lt;&amp;gt;&lt;BR /&gt;This is free software: you are free to change and redistribute it.&lt;BR /&gt;There is NO WARRANTY, to the extent permitted by law.&lt;BR /&gt;Written by John Gilmore and Jay Fenlason.&lt;BR /&gt;</description>
      <pubDate>Sun, 03 Jan 2010 00:35:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555890#M60230</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2010-01-03T00:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555891#M60231</link>
      <description>That's because it's a CPIO image..&lt;BR /&gt;&lt;BR /&gt;initrd / ramdisk images are gzip'd CPIO files.&lt;BR /&gt;&lt;BR /&gt;To extract 'ramdisk.dat':&lt;BR /&gt;&lt;BR /&gt;tmp]# mkdir image; cd image&lt;BR /&gt;image]# gzip -cd ../ramdisk.dat | cpio -vidum &lt;BR /&gt;&lt;BR /&gt;To re-create the ramdisk image:&lt;BR /&gt;&lt;BR /&gt;image]# find . -print | cpio -ocv | gzip -9 &amp;gt; ../ramdisk-new.dat</description>
      <pubDate>Tue, 05 Jan 2010 06:59:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555891#M60231</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2010-01-05T06:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555892#M60232</link>
      <description>I've done what u suggested: &lt;BR /&gt;&lt;BR /&gt;linux:/tmp#  mkdir image; cd image&lt;BR /&gt;linux:/tmp/image# gzip -cd /home/ramdisk/ramdisk.dat | cpio -vidum&lt;BR /&gt;&lt;BR /&gt;and the linux server doesn't start anymore.&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Jan 2010 16:16:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555892#M60232</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2010-01-05T16:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAT file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555893#M60233</link>
      <description>&lt;!--!*#--&gt;&amp;gt; and the linux server doesn't start anymore.&lt;BR /&gt;&lt;BR /&gt;I don't recall having been shown the contents&lt;BR /&gt;of this cpio archive ("cpio -tv"), so I know&lt;BR /&gt;nothing, but if it contained absolute paths&lt;BR /&gt;instead of relative paths, then restoring it&lt;BR /&gt;(with "-u") might have overwritten a&lt;BR /&gt;directory like, say, "/dev", with&lt;BR /&gt;inappropriate data, and that could make a&lt;BR /&gt;system unusable.</description>
      <pubDate>Tue, 05 Jan 2010 21:21:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-dat-file/m-p/4555893#M60233</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-01-05T21:21:26Z</dc:date>
    </item>
  </channel>
</rss>

