From owner-freebsd-questions@freebsd.org Fri Dec 28 14:27:35 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3408143A3F5 for ; Fri, 28 Dec 2018 14:27:35 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0B18CB18 for ; Fri, 28 Dec 2018 14:27:34 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.195.55.180]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPA (Nemesis) id 1Mo6zD-1h9hk94B6x-00pgXu; Fri, 28 Dec 2018 15:22:19 +0100 Date: Fri, 28 Dec 2018 15:22:18 +0100 From: Polytropon To: Jonathan Engwall Cc: freebsd-questions@freebsd.org Subject: Re: Hello(trouble with magic number) Message-Id: <20181228152218.596c04c1.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:w6NOYOTgmH/JodqRzg1MWaOnumEzjtJUdHPoH5q7ix+hNY/ubju R6EtsbcC/KCQF9PF+J/1Ahu4xYh1Z1pQpa2oNLMY4vh5JB8V++8lZI5mfuYnow8r5QrJMpT 7JMoHp+XASojSKOEqwvvDtd451i3yaQCKv/YCKu7QnXJpOKGV7X7O02ICb8LL16GZcOFVOL H2vHLwESAUka3lqNMWMyg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bXzqVjcfgsQ=:XdchV3K19Le7Tz2osXF5Ro ecMlKWv4XQHFR7xv3EwsOflnkAZgbEhyzq7CSZI1u/t+0oH+SiAfxNUvm34X+q7nWOE+1Xr3L EacOJ4KP2Itl4l90Xx+2z5Ok3yYVWc8NyU/gk9AWb1ZSLlMdpiwj/qWLuz8E3gmkLaGbzR/2Y XuaAjHl76T7cuc0c+FsGmE1EA9oHkXIxCbqlvAA0q57K/6zIrkA3otXDjGHqFBhfkQgjiYuxp BEa1to/EEISeg/QSGrvI+w0jbiT1gip16Hs7w+E1uOr0u2Qlp3wobV77jzb9XmnqCFi6ShuDV ZJWfN/7s52hVddFRF8OUb1xoqKF78yV9FLnkgBRmzm/3tULjbQ87VxVHYt39ewhdznEbPurZ+ vtT+Xuqoq/Ig0IuoXYkvpOEaC5JH//ltKgBlthXDcACtWx7diO2a3nRBJPtIRYAmiJKIIfd/1 59JYSgdxlmnFfXpBvonqHRNaaURYM3lhwGeuEjSzLezQqwl89Z53tF7ygZgulKAm3izhL+O4g T5OuBwLe8YpJGcesRR2Jth4Ev8KYu6xUUHpqpRn9h9qSxbOAusUN2Txeialyq3tW5HgjNSuhI cOPOONOqV2aNfzzOG1kGsd3df4wqTtjROIy9lgkyamcB/eu/Ox8Z0Zi0qSA8S3jd8+m5pN8qG AOPD1IQQ6SL/HjkPI1oYnBnxoRNNrjueMkzLA80IrTc4DqnvM/6N1d7yW3WaqrFkkRplYZPtE wu8IAGOFM1NkdMYKP8ED29Yb4wVievDiW7X2EzsrUBtqyDFO0P9yoUAEwd0= X-Rspamd-Queue-Id: 7C0B18CB18 X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [6.27 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.01)[cached: mx00.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[180.55.195.92.zen.spamhaus.org : 127.0.0.10]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.88)[0.877,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(1.00)[0.999,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.995,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[130.126.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(1.01)[ip: (4.77), ipnet: 212.227.0.0/16(-0.38), asn: 8560(0.64), country: DE(-0.01)] X-Spam: Yes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2018 14:27:36 -0000 Re-including the list, I hope that's okay. Something went totally wrong with your quoting and reply. I'll fix it manually by adding "> " and removing "####" as needed. :-) On Thu, 27 Dec 2018 19:50:40 -0800, Jonathan Engwall wrote: > On Dec 27, 2018 4:43 PM, "Polytropon" wrote: > > > On Thu, 27 Dec 2018 15:06:38 -0800, Jonathan Engwall wrote: > > > Here is the problem: > > > My usb ext2fs has the wrong magic number. > > > Is this an offset? I rewrote the stick several times, even with 128 > > > inodes. > > > Still the magic number is 0. > > > I'm not sure you you want your USB stick to be Ext-2 > > formatted. Do you want it to use it as FreeBSD boot > > medium? In that case, simply dd'ing the FreeBSD image > > onto the stick should be sufficient - there won't be > > any Linux remains left (as they are not needed - all > > partitioning info is in the image). > > I booted with virtualbox. This is to try to instal some source code. What OS is running within VirtualBox? Or do you try to boot a VirtualBox instance with a FreeBSD image? If yes, why the need for a USB stick? I'm not fully sure that I understand what you're trying to do, but maybe you can clarify. Source code typically isn't installed on FreeBSD. While you can get the FreeBSD sources, as well as the sources for about everything in the ports collection, what you basically do is you _download_ source code, and then maybe compile it (or whatever you need to do with it, like patching it, examining it, testing it...) - all this is easily possible once FreeBSD is up and running. > > > Should I suspect the USB? Rufus rejects most of my usb stick though they > > > are still functional. > > > > Who is Rufus? > > > Rufus writes bootable medium very well. Rufus makes several passes which > can destroy a working disk Then tell Rufus this will not be needed. ;-) All you need is dd. The dd program or an equivalent is part of almost every operating system. The image you can download does already contain all information needed (like partitioning data, magic number, media size, boot attributes, filesystem information, the actual data, and so on). You need to write it 1:1 to the target medium. You do not need to prepare the medium (like erasing, partitioning, or formatting it). As I said, there is no Ext-2 involved. FreeBSD uses UFS, and the image contains that data already. In case you're using "Windows" instead of an operating system, you need to download a program that can write raw data to a device. The FreeBSD Handbook has a suggestion in procedure 2.2 in 2.3.3.1. https://www.freebsd.org/doc/handbook/bsdinstall-pre.html But you really just need to do something like this: # dd if=FreeBSD-10.2-RELEASE-amd64-memstick.img of=/dev/da0 bs=1M conv=sync If you are using Linux, replace /dev/da0 with the USB stick's device name (usually /dev/sd). > > > I see I have no geom command and no gpart either. > > > > Well, "gpart" is part of FreeBSD for many years now, just > > like the "geom" command. > > I have neither Actually, you don't need it. You only need dd. > > > Using centos and ubuntu I have never dealt with magic numbers. > > > > Can you provide a simplified list of what you did, and > > what seems to be the actual problem? > > At first the mount command was answered with "no recognizable file > structure" and usbconfig described the slices as out dlside of a readable > range. Hmmm... I'm still not understanding what you're trying to do. You do not mount the USB image, you just dd it to the medium. The image itself is - well, an image of a USB stick, containing partitioning data and a UFS filesystem. Of course you _could_ mount it (using a virtual node) if you wanted, but there is no need to do so. For further diagnostics, always provide the actual command you entered along with the error message you received. Additionally, I'm not aware that usbconfig reads slicing data. Again, this is not needed to create a USB boot medium for FreeBSD, if that is what you're trying to achieve. > My centos 7 does not write ufs and neither could it store any files > on it. That is totally okay - first of all, Linux has limited support for UFS, but as I said, you do not deal with UFS at all, you just use dd, and that's definitely part of CentOS. > Fat32 was unrecognizable, so after I found I do have mount_ext2fs I > tried that. Yes, FreeBSD can natively mount FAT partitions, but again, this is not needed. What you do is # dd if=FreeBSD-10.2-RELEASE-amd64-memstick.img of=/dev/sdb bs=1M conv=sync Verify that /dev/sdb is the name of the USB stick (assumed that /dev/sda is your CentOS system disk). Verify it again. You can check easily with "dmesg" output. If you're sure you're going to overwrite the correct device, go ahead and enter the command above. If CentOS's dd does not recognize the unit 1M, use 1024k instead. > What I want most is to install Python3.7 Python 3.7 is in the FreeBSD ports collection, there is also a precompiled package available to use with "pkg install". > Therefore I need to transfer files. You don't need to. The system will automatically download the correct files, extract them, and install Python. > Ftp , and telnet are not working and > ssh just hangs up. Well, telnet is not enabled by default, for good reasons, just like FTP. You can enable them via /etc/inetd.conf if needed, but always remember the security implications of doing so. What does "SSH hangs up" mean? Does it refuse to connect, timeout, present a login, but doesn't actually login? You need to enable SSH in /etc/rc.conf of course. > I have no internet at the moment. Then you should probably fix this first. FreeBSD cannot install anything until an Internet connection is provided. > On top of all that my > vm's are getting the same ip address! What is the host OS? Do you have "local DHCP" enabled for the VMs? What OS is inside the VMs? > Thank you for your reply. I hope you can help a bit. That's a lot of problems, not entirely related to FreeBSD... ;-) I know that a broken environment can be really frustrating. Check what's top priority, and fix this first. Then go ahead and solve all other problems depending on how they impact your further actions. My suggestion would be to first get the FreeBSD USB stick initialized with dd, using the image you already downloaded, then boot your system with it to see if it works. Next step next. :-) PS. Use "reply all" when replying to the list as well as to the list member who replied; "reply to list" is okay too, at least for me, as I'm subscribed to the list. Make sure your mail program uses "> " to indent quotes properly, so it doesn't rip the thread structure. The correct reply method is also important to keep the thread references intact which reside in the mail's headers. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...